--
-- PostgreSQL database dump
--

\restrict hEsJCx671IvgUTePxcVMBcIncAFUAThQo1FgAmti0KgSEidJNRbF5IUKPmGV9kV

-- Dumped from database version 14.20 (Homebrew)
-- Dumped by pg_dump version 14.20 (Homebrew)

SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- Name: check_signup_limit(); Type: FUNCTION; Schema: public; Owner: zf
--

CREATE FUNCTION public.check_signup_limit() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
    IF NEW.signup_count > (SELECT max_limit FROM labor_activities WHERE id = NEW.id) THEN
        RAISE EXCEPTION '报名人数已超过活动限制';
    END IF;
    RETURN NEW;
END;
$$;


ALTER FUNCTION public.check_signup_limit() OWNER TO zf;

--
-- Name: update_activity_timestamp(); Type: FUNCTION; Schema: public; Owner: zf
--

CREATE FUNCTION public.update_activity_timestamp() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
   NEW.updated_at = CURRENT_TIMESTAMP;
   RETURN NEW;
END;
$$;


ALTER FUNCTION public.update_activity_timestamp() OWNER TO zf;

--
-- Name: update_conversation_timestamp(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.update_conversation_timestamp() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
    UPDATE chat_conversations 
    SET updated_at = CURRENT_TIMESTAMP 
    WHERE id = NEW.conversation_id;
    RETURN NEW;
END;
$$;


ALTER FUNCTION public.update_conversation_timestamp() OWNER TO postgres;

--
-- Name: update_defense_activity_timestamp(); Type: FUNCTION; Schema: public; Owner: zf
--

CREATE FUNCTION public.update_defense_activity_timestamp() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
   NEW.updated_at = CURRENT_TIMESTAMP;
   RETURN NEW;
END;
$$;


ALTER FUNCTION public.update_defense_activity_timestamp() OWNER TO zf;

--
-- Name: update_education_activity_timestamp(); Type: FUNCTION; Schema: public; Owner: zf
--

CREATE FUNCTION public.update_education_activity_timestamp() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
   NEW.updated_at = CURRENT_TIMESTAMP;
   RETURN NEW;
END;
$$;


ALTER FUNCTION public.update_education_activity_timestamp() OWNER TO zf;

--
-- Name: update_labor_activity_timestamp(); Type: FUNCTION; Schema: public; Owner: zf
--

CREATE FUNCTION public.update_labor_activity_timestamp() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
   NEW.updated_at = CURRENT_TIMESTAMP;
   RETURN NEW;
END;
$$;


ALTER FUNCTION public.update_labor_activity_timestamp() OWNER TO zf;

--
-- Name: update_timestamp(); Type: FUNCTION; Schema: public; Owner: zf
--

CREATE FUNCTION public.update_timestamp() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
   NEW.updated_at = CURRENT_TIMESTAMP;
   RETURN NEW;
END;
$$;


ALTER FUNCTION public.update_timestamp() OWNER TO zf;

--
-- Name: update_updated_at(); Type: FUNCTION; Schema: public; Owner: postgres
--

CREATE FUNCTION public.update_updated_at() RETURNS trigger
    LANGUAGE plpgsql
    AS $$
BEGIN
    NEW.updated_at = CURRENT_TIMESTAMP;
    RETURN NEW;
END;
$$;


ALTER FUNCTION public.update_updated_at() OWNER TO postgres;

SET default_tablespace = '';

SET default_table_access_method = heap;

--
-- Name: activities; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.activities (
    id bigint NOT NULL,
    title character varying(255) NOT NULL,
    start_date date DEFAULT CURRENT_DATE NOT NULL,
    end_date date DEFAULT CURRENT_DATE NOT NULL,
    total_days integer DEFAULT 0 NOT NULL,
    created_by bigint,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    address character varying(255) DEFAULT ''::character varying,
    start_time time without time zone,
    registration_deadline timestamp without time zone,
    target_audience character varying(255) DEFAULT '全体师生'::character varying,
    is_free boolean DEFAULT true,
    publish_time timestamp without time zone,
    description text,
    updated_at timestamp(6) without time zone,
    base_id bigint,
    base_name character varying(255),
    max_participants integer DEFAULT 50,
    current_participants integer DEFAULT 0,
    creator_id bigint
);


ALTER TABLE public.activities OWNER TO postgres;

--
-- Name: TABLE activities; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.activities IS '活动表';


--
-- Name: COLUMN activities.title; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activities.title IS '活动名称';


--
-- Name: COLUMN activities.start_date; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activities.start_date IS '活动开始日期';


--
-- Name: COLUMN activities.end_date; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activities.end_date IS '活动结束日期';


--
-- Name: COLUMN activities.total_days; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activities.total_days IS '活动总天数';


--
-- Name: COLUMN activities.created_by; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activities.created_by IS '活动创建人用户ID';


--
-- Name: activities_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.activities_id_seq
    START WITH 11
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.activities_id_seq OWNER TO postgres;

--
-- Name: activities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.activities_id_seq OWNED BY public.activities.id;


--
-- Name: activities_id_seq1; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.activities_id_seq1
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.activities_id_seq1 OWNER TO postgres;

--
-- Name: activities_id_seq1; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.activities_id_seq1 OWNED BY public.activities.id;


--
-- Name: activity_bases; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.activity_bases (
    id bigint NOT NULL,
    name character varying(255) NOT NULL,
    description text,
    address character varying(255),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    contact_person character varying(50),
    contact_phone character varying(20),
    updated_at timestamp(6) without time zone
);


ALTER TABLE public.activity_bases OWNER TO postgres;

--
-- Name: activity_bases_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.activity_bases_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.activity_bases_id_seq OWNER TO postgres;

--
-- Name: activity_bases_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.activity_bases_id_seq OWNED BY public.activity_bases.id;


--
-- Name: activity_categories; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.activity_categories (
    id integer NOT NULL,
    component_name character varying(255),
    label character varying(255) NOT NULL,
    value character varying(255) NOT NULL,
    display_order integer,
    enabled boolean NOT NULL
);


ALTER TABLE public.activity_categories OWNER TO postgres;

--
-- Name: activity_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.activity_categories_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.activity_categories_id_seq OWNER TO postgres;

--
-- Name: activity_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.activity_categories_id_seq OWNED BY public.activity_categories.id;


--
-- Name: activity_checkin_images; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.activity_checkin_images (
    id bigint NOT NULL,
    checkin_id bigint NOT NULL,
    image_url character varying(255) NOT NULL,
    created_at timestamp(6) without time zone,
    description character varying(200),
    sort_order integer
);


ALTER TABLE public.activity_checkin_images OWNER TO postgres;

--
-- Name: TABLE activity_checkin_images; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.activity_checkin_images IS '活动打卡图片表';


--
-- Name: COLUMN activity_checkin_images.checkin_id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_checkin_images.checkin_id IS '打卡记录ID';


--
-- Name: COLUMN activity_checkin_images.image_url; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_checkin_images.image_url IS '图片URL';


--
-- Name: activity_checkin_images_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.activity_checkin_images_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.activity_checkin_images_id_seq OWNER TO postgres;

--
-- Name: activity_checkin_images_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.activity_checkin_images_id_seq OWNED BY public.activity_checkin_images.id;


--
-- Name: activity_checkins; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.activity_checkins (
    id bigint NOT NULL,
    activity_id bigint NOT NULL,
    user_id bigint NOT NULL,
    check_date date NOT NULL,
    check_time time without time zone,
    description text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    checkin_type character varying(20)
);


ALTER TABLE public.activity_checkins OWNER TO postgres;

--
-- Name: TABLE activity_checkins; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.activity_checkins IS '活动打卡记录表';


--
-- Name: COLUMN activity_checkins.activity_id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_checkins.activity_id IS '活动ID';


--
-- Name: COLUMN activity_checkins.user_id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_checkins.user_id IS '用户ID';


--
-- Name: COLUMN activity_checkins.check_date; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_checkins.check_date IS '打卡日期';


--
-- Name: COLUMN activity_checkins.check_time; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_checkins.check_time IS '打卡时间';


--
-- Name: COLUMN activity_checkins.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_checkins.description IS '打卡说明';


--
-- Name: activity_checkins_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.activity_checkins_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.activity_checkins_id_seq OWNER TO postgres;

--
-- Name: activity_checkins_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.activity_checkins_id_seq OWNED BY public.activity_checkins.id;


--
-- Name: activity_participants; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.activity_participants (
    id bigint NOT NULL,
    activity_id bigint NOT NULL,
    user_id bigint NOT NULL,
    joined_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    signup_time timestamp(6) without time zone,
    created_at timestamp(6) without time zone,
    remark character varying(500),
    updated_at timestamp(6) without time zone
);


ALTER TABLE public.activity_participants OWNER TO postgres;

--
-- Name: TABLE activity_participants; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.activity_participants IS '活动参与记录表';


--
-- Name: COLUMN activity_participants.activity_id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_participants.activity_id IS '活动ID';


--
-- Name: COLUMN activity_participants.user_id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_participants.user_id IS '用户ID';


--
-- Name: COLUMN activity_participants.joined_at; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.activity_participants.joined_at IS '参加时间';


--
-- Name: activity_participants_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.activity_participants_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.activity_participants_id_seq OWNER TO postgres;

--
-- Name: activity_participants_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.activity_participants_id_seq OWNED BY public.activity_participants.id;


--
-- Name: chat_conversations; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.chat_conversations (
    id bigint NOT NULL,
    type character varying(20) NOT NULL,
    title character varying(255),
    created_by bigint NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    CONSTRAINT chat_conversations_type_check CHECK (((type)::text = ANY ((ARRAY['private'::character varying, 'group'::character varying])::text[])))
);


ALTER TABLE public.chat_conversations OWNER TO postgres;

--
-- Name: TABLE chat_conversations; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.chat_conversations IS '聊天会话表';


--
-- Name: COLUMN chat_conversations.type; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.chat_conversations.type IS '会话类型：private-私聊, group-群聊';


--
-- Name: COLUMN chat_conversations.title; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.chat_conversations.title IS '会话标题（群聊名称，私聊可为空）';


--
-- Name: COLUMN chat_conversations.created_by; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.chat_conversations.created_by IS '会话创建者用户ID';


--
-- Name: chat_conversations_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.chat_conversations_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.chat_conversations_id_seq OWNER TO postgres;

--
-- Name: chat_conversations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.chat_conversations_id_seq OWNED BY public.chat_conversations.id;


--
-- Name: chat_messages; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.chat_messages (
    id bigint NOT NULL,
    conversation_id bigint NOT NULL,
    sender_id bigint NOT NULL,
    message_type character varying(20) DEFAULT 'text'::character varying,
    content text NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    CONSTRAINT chat_messages_message_type_check CHECK (((message_type)::text = 'text'::text))
);


ALTER TABLE public.chat_messages OWNER TO postgres;

--
-- Name: TABLE chat_messages; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.chat_messages IS '聊天消息表';


--
-- Name: COLUMN chat_messages.message_type; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.chat_messages.message_type IS '消息类型（目前只支持text）';


--
-- Name: COLUMN chat_messages.content; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.chat_messages.content IS '消息内容';


--
-- Name: COLUMN chat_messages.created_at; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.chat_messages.created_at IS '消息发送时间';


--
-- Name: chat_messages_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.chat_messages_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.chat_messages_id_seq OWNER TO postgres;

--
-- Name: chat_messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.chat_messages_id_seq OWNED BY public.chat_messages.id;


--
-- Name: chat_participants; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.chat_participants (
    id bigint NOT NULL,
    conversation_id bigint NOT NULL,
    user_id bigint NOT NULL,
    role character varying(20) DEFAULT 'member'::character varying,
    joined_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    CONSTRAINT chat_participants_role_check CHECK (((role)::text = ANY ((ARRAY['member'::character varying, 'admin'::character varying])::text[])))
);


ALTER TABLE public.chat_participants OWNER TO postgres;

--
-- Name: TABLE chat_participants; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.chat_participants IS '聊天参与者表';


--
-- Name: COLUMN chat_participants.role; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.chat_participants.role IS '成员角色：member-普通成员, admin-管理员';


--
-- Name: COLUMN chat_participants.joined_at; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.chat_participants.joined_at IS '加入会话时间';


--
-- Name: chat_participants_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.chat_participants_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.chat_participants_id_seq OWNER TO postgres;

--
-- Name: chat_participants_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.chat_participants_id_seq OWNED BY public.chat_participants.id;


--
-- Name: check_in_activities; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.check_in_activities (
    id bigint NOT NULL,
    checked_days integer NOT NULL,
    end_date date NOT NULL,
    is_checked boolean NOT NULL,
    start_date date NOT NULL,
    title character varying(255) NOT NULL,
    total_days integer NOT NULL
);


ALTER TABLE public.check_in_activities OWNER TO postgres;

--
-- Name: check_in_activities_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.check_in_activities_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.check_in_activities_id_seq OWNER TO postgres;

--
-- Name: check_in_activities_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.check_in_activities_id_seq OWNED BY public.check_in_activities.id;


--
-- Name: check_in_images; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.check_in_images (
    id bigint NOT NULL,
    image_url character varying(255) NOT NULL,
    record_id bigint NOT NULL
);


ALTER TABLE public.check_in_images OWNER TO postgres;

--
-- Name: check_in_images_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.check_in_images_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.check_in_images_id_seq OWNER TO postgres;

--
-- Name: check_in_images_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.check_in_images_id_seq OWNED BY public.check_in_images.id;


--
-- Name: check_in_records; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.check_in_records (
    id bigint NOT NULL,
    check_date date NOT NULL,
    check_time time(6) without time zone,
    description text,
    activity_id bigint NOT NULL
);


ALTER TABLE public.check_in_records OWNER TO postgres;

--
-- Name: check_in_records_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.check_in_records_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.check_in_records_id_seq OWNER TO postgres;

--
-- Name: check_in_records_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.check_in_records_id_seq OWNED BY public.check_in_records.id;


--
-- Name: classes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.classes (
    class_id bigint NOT NULL,
    class_name character varying(255) NOT NULL,
    head_teacher character varying(255),
    student_count integer,
    grade_id bigint
);


ALTER TABLE public.classes OWNER TO postgres;

--
-- Name: classes_class_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.classes_class_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.classes_class_id_seq OWNER TO postgres;

--
-- Name: classes_class_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.classes_class_id_seq OWNED BY public.classes.class_id;


--
-- Name: classrooms; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.classrooms (
    classroom_id bigint NOT NULL,
    room_number character varying(255) NOT NULL,
    building character varying(255),
    capacity integer
);


ALTER TABLE public.classrooms OWNER TO postgres;

--
-- Name: classrooms_classroom_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.classrooms_classroom_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.classrooms_classroom_id_seq OWNER TO postgres;

--
-- Name: classrooms_classroom_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.classrooms_classroom_id_seq OWNED BY public.classrooms.classroom_id;


--
-- Name: course_categories; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.course_categories (
    id integer NOT NULL,
    name character varying(255) NOT NULL,
    icon character varying(255),
    category_type character varying(255) NOT NULL,
    display_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp(6) without time zone,
    CONSTRAINT course_categories_category_type_check CHECK (((category_type)::text = ANY (ARRAY[('all'::character varying)::text, ('popular'::character varying)::text, ('featured'::character varying)::text])))
);


ALTER TABLE public.course_categories OWNER TO postgres;

--
-- Name: TABLE course_categories; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.course_categories IS '课程分类表';


--
-- Name: COLUMN course_categories.name; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_categories.name IS '分类名称（如语文课程）';


--
-- Name: COLUMN course_categories.icon; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_categories.icon IS '图标标识';


--
-- Name: COLUMN course_categories.category_type; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_categories.category_type IS '分类类型：all|popular|featured';


--
-- Name: COLUMN course_categories.display_order; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_categories.display_order IS '显示顺序';


--
-- Name: course_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.course_categories_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.course_categories_id_seq OWNER TO postgres;

--
-- Name: course_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.course_categories_id_seq OWNED BY public.course_categories.id;


--
-- Name: course_items; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.course_items (
    id integer NOT NULL,
    category_id integer NOT NULL,
    name character varying(255) NOT NULL,
    icon character varying(255),
    is_featured boolean DEFAULT false,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.course_items OWNER TO postgres;

--
-- Name: TABLE course_items; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.course_items IS '课程子项表';


--
-- Name: COLUMN course_items.category_id; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_items.category_id IS '关联分类ID';


--
-- Name: COLUMN course_items.name; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_items.name IS '课程名称（如Python基础）';


--
-- Name: COLUMN course_items.icon; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_items.icon IS '课程图标';


--
-- Name: COLUMN course_items.is_featured; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_items.is_featured IS '是否精选课程';


--
-- Name: course_items_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.course_items_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.course_items_id_seq OWNER TO postgres;

--
-- Name: course_items_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.course_items_id_seq OWNED BY public.course_items.id;


--
-- Name: course_recordings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.course_recordings (
    id bigint NOT NULL,
    thumbnail_url character varying(255) NOT NULL,
    title character varying(255) NOT NULL,
    start_time timestamp without time zone NOT NULL,
    end_time timestamp without time zone NOT NULL,
    class_name character varying(255) NOT NULL,
    description character varying(255),
    video_url character varying(255) NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.course_recordings OWNER TO postgres;

--
-- Name: TABLE course_recordings; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.course_recordings IS '课程实录表';


--
-- Name: COLUMN course_recordings.thumbnail_url; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_recordings.thumbnail_url IS '缩略图URL';


--
-- Name: COLUMN course_recordings.title; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_recordings.title IS '课程标题';


--
-- Name: COLUMN course_recordings.start_time; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_recordings.start_time IS '开始时间';


--
-- Name: COLUMN course_recordings.end_time; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_recordings.end_time IS '结束时间';


--
-- Name: COLUMN course_recordings.class_name; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_recordings.class_name IS '班级名称';


--
-- Name: COLUMN course_recordings.description; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_recordings.description IS '课程描述';


--
-- Name: COLUMN course_recordings.video_url; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_recordings.video_url IS '视频URL';


--
-- Name: COLUMN course_recordings.created_at; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_recordings.created_at IS '创建时间';


--
-- Name: COLUMN course_recordings.updated_at; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.course_recordings.updated_at IS '更新时间';


--
-- Name: course_recordings_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.course_recordings_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.course_recordings_id_seq OWNER TO postgres;

--
-- Name: course_recordings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.course_recordings_id_seq OWNED BY public.course_recordings.id;


--
-- Name: courses; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.courses (
    course_id bigint NOT NULL,
    course_name character varying(255) NOT NULL,
    category character varying(255) NOT NULL,
    credit integer
);


ALTER TABLE public.courses OWNER TO postgres;

--
-- Name: courses_course_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.courses_course_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.courses_course_id_seq OWNER TO postgres;

--
-- Name: courses_course_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.courses_course_id_seq OWNED BY public.courses.course_id;


--
-- Name: defense_education_activities_id_seq; Type: SEQUENCE; Schema: public; Owner: zf
--

CREATE SEQUENCE public.defense_education_activities_id_seq
    START WITH 311
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.defense_education_activities_id_seq OWNER TO zf;

--
-- Name: education_activities_id_seq; Type: SEQUENCE; Schema: public; Owner: zf
--

CREATE SEQUENCE public.education_activities_id_seq
    START WITH 211
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.education_activities_id_seq OWNER TO zf;

--
-- Name: education_sub_theme; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.education_sub_theme (
    id bigint NOT NULL,
    cover_image character varying(255),
    description character varying(500),
    label character varying(100) NOT NULL,
    name character varying(100) NOT NULL,
    sort_order integer,
    theme_id bigint NOT NULL
);


ALTER TABLE public.education_sub_theme OWNER TO postgres;

--
-- Name: education_sub_theme_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.education_sub_theme_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.education_sub_theme_id_seq OWNER TO postgres;

--
-- Name: education_sub_theme_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.education_sub_theme_id_seq OWNED BY public.education_sub_theme.id;


--
-- Name: education_themes; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.education_themes (
    id bigint NOT NULL,
    name character varying(100) NOT NULL,
    label character varying(100) NOT NULL,
    description text,
    cover_image character varying(255),
    is_main boolean DEFAULT false,
    parent_id bigint,
    sort_order integer DEFAULT 0,
    created_by bigint DEFAULT 1 NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.education_themes OWNER TO postgres;

--
-- Name: education_themes_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.education_themes_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.education_themes_id_seq OWNER TO postgres;

--
-- Name: education_themes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.education_themes_id_seq OWNED BY public.education_themes.id;


--
-- Name: extracurricular_categories; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.extracurricular_categories (
    id integer NOT NULL,
    name character varying(100) NOT NULL,
    description text,
    icon character varying(50),
    sort_order integer DEFAULT 0
);


ALTER TABLE public.extracurricular_categories OWNER TO postgres;

--
-- Name: extracurricular_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.extracurricular_categories_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.extracurricular_categories_id_seq OWNER TO postgres;

--
-- Name: extracurricular_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.extracurricular_categories_id_seq OWNED BY public.extracurricular_categories.id;


--
-- Name: extracurricular_recordings; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.extracurricular_recordings (
    id bigint NOT NULL,
    teacher_id integer NOT NULL,
    term_id integer NOT NULL,
    class_id integer NOT NULL,
    title character varying(255) NOT NULL,
    description text,
    category character varying(100) NOT NULL,
    activity_date date NOT NULL,
    start_time time without time zone NOT NULL,
    end_time time without time zone NOT NULL,
    total_minutes integer,
    thumbnail_url character varying(500),
    video_url character varying(500) NOT NULL,
    document_url character varying(500),
    activity_type character varying(50),
    location character varying(200),
    participant_count integer,
    is_published boolean DEFAULT true,
    is_featured boolean DEFAULT false,
    view_count integer DEFAULT 0,
    like_count integer DEFAULT 0,
    created_by integer NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    achievement_description text,
    approval_status character varying(255),
    award_info character varying(255),
    photo_album_url character varying(255),
    share_count integer,
    student_works_url character varying(255),
    updated_by integer
);


ALTER TABLE public.extracurricular_recordings OWNER TO postgres;

--
-- Name: extracurricular_recordings_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.extracurricular_recordings_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.extracurricular_recordings_id_seq OWNER TO postgres;

--
-- Name: extracurricular_recordings_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.extracurricular_recordings_id_seq OWNED BY public.extracurricular_recordings.id;


--
-- Name: extracurricular_tags; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.extracurricular_tags (
    id bigint NOT NULL,
    recording_id bigint NOT NULL,
    tag_name character varying(50) NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.extracurricular_tags OWNER TO postgres;

--
-- Name: extracurricular_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.extracurricular_tags_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.extracurricular_tags_id_seq OWNER TO postgres;

--
-- Name: extracurricular_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.extracurricular_tags_id_seq OWNED BY public.extracurricular_tags.id;


--
-- Name: grades; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.grades (
    grade_id bigint NOT NULL,
    grade_name character varying(20) NOT NULL,
    description character varying(255),
    sort_order integer
);


ALTER TABLE public.grades OWNER TO postgres;

--
-- Name: grades_grade_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.grades_grade_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.grades_grade_id_seq OWNER TO postgres;

--
-- Name: grades_grade_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.grades_grade_id_seq OWNED BY public.grades.grade_id;


--
-- Name: notice_recipients; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.notice_recipients (
    recipient_id bigint NOT NULL,
    notice_id bigint NOT NULL,
    recipient_type character varying(20) NOT NULL,
    target_id bigint,
    read_status boolean DEFAULT false,
    read_at timestamp without time zone,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.notice_recipients OWNER TO postgres;

--
-- Name: notice_recipients_recipient_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.notice_recipients_recipient_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.notice_recipients_recipient_id_seq OWNER TO postgres;

--
-- Name: notice_recipients_recipient_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.notice_recipients_recipient_id_seq OWNED BY public.notice_recipients.recipient_id;


--
-- Name: notice_types; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.notice_types (
    type_id bigint NOT NULL,
    type_name character varying(50) NOT NULL,
    description text,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.notice_types OWNER TO postgres;

--
-- Name: notice_types_type_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.notice_types_type_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.notice_types_type_id_seq OWNER TO postgres;

--
-- Name: notice_types_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.notice_types_type_id_seq OWNED BY public.notice_types.type_id;


--
-- Name: notices; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.notices (
    notice_id bigint NOT NULL,
    title character varying(200) NOT NULL,
    type_id bigint NOT NULL,
    description text,
    content text NOT NULL,
    schedule_id bigint,
    created_by bigint NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.notices OWNER TO postgres;

--
-- Name: notices_notice_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.notices_notice_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.notices_notice_id_seq OWNER TO postgres;

--
-- Name: notices_notice_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.notices_notice_id_seq OWNED BY public.notices.notice_id;


--
-- Name: resource_types; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.resource_types (
    code character varying(20) NOT NULL,
    label character varying(20) NOT NULL,
    icon character varying(50)
);


ALTER TABLE public.resource_types OWNER TO postgres;

--
-- Name: resources; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.resources (
    id bigint NOT NULL,
    name character varying(100) NOT NULL,
    type character varying(20) NOT NULL,
    size character varying(20) NOT NULL,
    file_url character varying(255) NOT NULL,
    subject character varying(50),
    uploader_id integer NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    file_type character varying(50)
);


ALTER TABLE public.resources OWNER TO postgres;

--
-- Name: resources_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.resources_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.resources_id_seq OWNER TO postgres;

--
-- Name: resources_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.resources_id_seq OWNED BY public.resources.id;


--
-- Name: schedules; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.schedules (
    schedule_id bigint NOT NULL,
    term_id bigint,
    week_day integer NOT NULL,
    slot_id bigint,
    class_id bigint,
    course_id bigint,
    teacher_id bigint,
    classroom_id bigint,
    activity_type character varying(255),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    specific_date date,
    week_number integer,
    display_name character varying(200),
    CONSTRAINT schedules_week_day_check CHECK (((week_day >= 1) AND (week_day <= 7)))
);


ALTER TABLE public.schedules OWNER TO postgres;

--
-- Name: schedules_schedule_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.schedules_schedule_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.schedules_schedule_id_seq OWNER TO postgres;

--
-- Name: schedules_schedule_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.schedules_schedule_id_seq OWNED BY public.schedules.schedule_id;


--
-- Name: student_statistics; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.student_statistics (
    id bigint NOT NULL,
    student_id bigint NOT NULL,
    term_id bigint NOT NULL,
    average_score double precision DEFAULT 0.00 NOT NULL,
    attendance_rate double precision DEFAULT 0.00 NOT NULL,
    honor_evaluation character varying(20) DEFAULT 'average'::character varying NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.student_statistics OWNER TO postgres;

--
-- Name: student_statistics_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.student_statistics_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.student_statistics_id_seq OWNER TO postgres;

--
-- Name: student_statistics_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.student_statistics_id_seq OWNED BY public.student_statistics.id;


--
-- Name: teacher_class; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.teacher_class (
    teacher_id bigint NOT NULL,
    class_id bigint NOT NULL,
    id bigint NOT NULL,
    created_at timestamp(6) without time zone
);


ALTER TABLE public.teacher_class OWNER TO postgres;

--
-- Name: teacher_class_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.teacher_class_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.teacher_class_id_seq OWNER TO postgres;

--
-- Name: teacher_class_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.teacher_class_id_seq OWNED BY public.teacher_class.id;


--
-- Name: teacher_tools; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.teacher_tools (
    id bigint NOT NULL,
    name character varying(100) NOT NULL,
    icon character varying(50) NOT NULL,
    route_path character varying(200),
    sort_order integer DEFAULT 0,
    is_active boolean DEFAULT true,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.teacher_tools OWNER TO postgres;

--
-- Name: TABLE teacher_tools; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON TABLE public.teacher_tools IS '教师工具表';


--
-- Name: COLUMN teacher_tools.name; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.teacher_tools.name IS '工具名称';


--
-- Name: COLUMN teacher_tools.icon; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.teacher_tools.icon IS '图标名称（对应前端Element Plus图标）';


--
-- Name: COLUMN teacher_tools.route_path; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.teacher_tools.route_path IS '路由路径（可选）';


--
-- Name: COLUMN teacher_tools.sort_order; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.teacher_tools.sort_order IS '显示顺序';


--
-- Name: COLUMN teacher_tools.is_active; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.teacher_tools.is_active IS '是否启用';


--
-- Name: COLUMN teacher_tools.created_at; Type: COMMENT; Schema: public; Owner: postgres
--

COMMENT ON COLUMN public.teacher_tools.created_at IS '创建时间';


--
-- Name: teacher_tools_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.teacher_tools_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.teacher_tools_id_seq OWNER TO postgres;

--
-- Name: teacher_tools_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.teacher_tools_id_seq OWNED BY public.teacher_tools.id;


--
-- Name: teachers; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.teachers (
    teacher_id bigint NOT NULL,
    teacher_name character varying(255) NOT NULL,
    title character varying(255),
    specialty character varying(255)
);


ALTER TABLE public.teachers OWNER TO postgres;

--
-- Name: teachers_teacher_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.teachers_teacher_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.teachers_teacher_id_seq OWNER TO postgres;

--
-- Name: teachers_teacher_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.teachers_teacher_id_seq OWNED BY public.teachers.teacher_id;


--
-- Name: teaching_categories; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.teaching_categories (
    id bigint NOT NULL,
    grade_id integer NOT NULL,
    name character varying(100) NOT NULL,
    icon character varying(50),
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.teaching_categories OWNER TO postgres;

--
-- Name: teaching_categories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.teaching_categories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.teaching_categories_id_seq OWNER TO postgres;

--
-- Name: teaching_categories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.teaching_categories_id_seq OWNED BY public.teaching_categories.id;


--
-- Name: teaching_resource_types; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.teaching_resource_types (
    id integer NOT NULL,
    name character varying(50) NOT NULL,
    code character varying(20) NOT NULL,
    icon character varying(50),
    sort_order integer DEFAULT 0
);


ALTER TABLE public.teaching_resource_types OWNER TO postgres;

--
-- Name: teaching_resource_types_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.teaching_resource_types_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.teaching_resource_types_id_seq OWNER TO postgres;

--
-- Name: teaching_resource_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.teaching_resource_types_id_seq OWNED BY public.teaching_resource_types.id;


--
-- Name: teaching_resources; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.teaching_resources (
    id bigint NOT NULL,
    subcategory_id bigint NOT NULL,
    type_id integer NOT NULL,
    title character varying(255) NOT NULL,
    description text,
    file_url character varying(500) NOT NULL,
    file_size character varying(20) NOT NULL,
    cover_image character varying(500),
    subject character varying(50),
    uploader_id integer NOT NULL,
    download_count integer DEFAULT 0,
    view_count integer DEFAULT 0,
    is_recommended boolean DEFAULT false,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.teaching_resources OWNER TO postgres;

--
-- Name: teaching_resources_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.teaching_resources_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.teaching_resources_id_seq OWNER TO postgres;

--
-- Name: teaching_resources_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.teaching_resources_id_seq OWNED BY public.teaching_resources.id;


--
-- Name: teaching_subcategories; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.teaching_subcategories (
    id bigint NOT NULL,
    category_id bigint NOT NULL,
    name character varying(100) NOT NULL,
    sort_order integer DEFAULT 0,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.teaching_subcategories OWNER TO postgres;

--
-- Name: teaching_subcategories_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.teaching_subcategories_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.teaching_subcategories_id_seq OWNER TO postgres;

--
-- Name: teaching_subcategories_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.teaching_subcategories_id_seq OWNED BY public.teaching_subcategories.id;


--
-- Name: terms; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.terms (
    term_id bigint NOT NULL,
    term_name character varying(255) NOT NULL,
    start_date date NOT NULL,
    end_date date NOT NULL,
    is_current boolean DEFAULT false
);


ALTER TABLE public.terms OWNER TO postgres;

--
-- Name: terms_term_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.terms_term_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.terms_term_id_seq OWNER TO postgres;

--
-- Name: terms_term_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.terms_term_id_seq OWNED BY public.terms.term_id;


--
-- Name: theme_contents; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.theme_contents (
    id bigint NOT NULL,
    theme_id bigint NOT NULL,
    title character varying(255) NOT NULL,
    description text,
    content text,
    cover_image character varying(255),
    content_type character varying(50) DEFAULT 'article'::character varying,
    external_url character varying(255),
    sort_order integer DEFAULT 0,
    is_published boolean DEFAULT true,
    created_by bigint DEFAULT 1 NOT NULL,
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    updated_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP
);


ALTER TABLE public.theme_contents OWNER TO postgres;

--
-- Name: theme_contents_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.theme_contents_id_seq
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.theme_contents_id_seq OWNER TO postgres;

--
-- Name: theme_contents_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.theme_contents_id_seq OWNED BY public.theme_contents.id;


--
-- Name: time_slots; Type: TABLE; Schema: public; Owner: postgres
--

CREATE TABLE public.time_slots (
    slot_id bigint NOT NULL,
    start_time time without time zone NOT NULL,
    end_time time without time zone NOT NULL,
    slot_name character varying(255) NOT NULL,
    sort_order integer NOT NULL
);


ALTER TABLE public.time_slots OWNER TO postgres;

--
-- Name: time_slots_slot_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--

CREATE SEQUENCE public.time_slots_slot_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.time_slots_slot_id_seq OWNER TO postgres;

--
-- Name: time_slots_slot_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--

ALTER SEQUENCE public.time_slots_slot_id_seq OWNED BY public.time_slots.slot_id;


--
-- Name: users; Type: TABLE; Schema: public; Owner: zf
--

CREATE TABLE public.users (
    id bigint NOT NULL,
    username character varying(50) NOT NULL,
    password character varying(100) NOT NULL,
    name character varying(50) NOT NULL,
    role character varying(20) NOT NULL,
    student_id character varying(20),
    teacher_id character varying(20),
    department character varying(100),
    major character varying(100),
    phone character varying(20) NOT NULL,
    email character varying(100),
    avatar character varying(255),
    created_at timestamp without time zone DEFAULT CURRENT_TIMESTAMP,
    class_id bigint,
    college character varying(100),
    specialty character varying(100),
    create_time timestamp(6) without time zone,
    CONSTRAINT users_role_check CHECK (((role)::text = ANY (ARRAY[('student'::character varying)::text, ('teacher'::character varying)::text, ('admin'::character varying)::text])))
);


ALTER TABLE public.users OWNER TO zf;

--
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: zf
--

CREATE SEQUENCE public.users_id_seq
    AS integer
    START WITH 1
    INCREMENT BY 1
    NO MINVALUE
    NO MAXVALUE
    CACHE 1;


ALTER TABLE public.users_id_seq OWNER TO zf;

--
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: zf
--

ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;


--
-- Name: activities id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activities ALTER COLUMN id SET DEFAULT nextval('public.activities_id_seq'::regclass);


--
-- Name: activity_bases id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_bases ALTER COLUMN id SET DEFAULT nextval('public.activity_bases_id_seq'::regclass);


--
-- Name: activity_categories id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_categories ALTER COLUMN id SET DEFAULT nextval('public.activity_categories_id_seq'::regclass);


--
-- Name: activity_checkin_images id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_checkin_images ALTER COLUMN id SET DEFAULT nextval('public.activity_checkin_images_id_seq'::regclass);


--
-- Name: activity_checkins id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_checkins ALTER COLUMN id SET DEFAULT nextval('public.activity_checkins_id_seq'::regclass);


--
-- Name: activity_participants id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_participants ALTER COLUMN id SET DEFAULT nextval('public.activity_participants_id_seq'::regclass);


--
-- Name: chat_conversations id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_conversations ALTER COLUMN id SET DEFAULT nextval('public.chat_conversations_id_seq'::regclass);


--
-- Name: chat_messages id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_messages ALTER COLUMN id SET DEFAULT nextval('public.chat_messages_id_seq'::regclass);


--
-- Name: chat_participants id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_participants ALTER COLUMN id SET DEFAULT nextval('public.chat_participants_id_seq'::regclass);


--
-- Name: check_in_activities id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.check_in_activities ALTER COLUMN id SET DEFAULT nextval('public.check_in_activities_id_seq'::regclass);


--
-- Name: check_in_images id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.check_in_images ALTER COLUMN id SET DEFAULT nextval('public.check_in_images_id_seq'::regclass);


--
-- Name: check_in_records id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.check_in_records ALTER COLUMN id SET DEFAULT nextval('public.check_in_records_id_seq'::regclass);


--
-- Name: classes class_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.classes ALTER COLUMN class_id SET DEFAULT nextval('public.classes_class_id_seq'::regclass);


--
-- Name: classrooms classroom_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.classrooms ALTER COLUMN classroom_id SET DEFAULT nextval('public.classrooms_classroom_id_seq'::regclass);


--
-- Name: course_categories id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_categories ALTER COLUMN id SET DEFAULT nextval('public.course_categories_id_seq'::regclass);


--
-- Name: course_items id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_items ALTER COLUMN id SET DEFAULT nextval('public.course_items_id_seq'::regclass);


--
-- Name: course_recordings id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_recordings ALTER COLUMN id SET DEFAULT nextval('public.course_recordings_id_seq'::regclass);


--
-- Name: courses course_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.courses ALTER COLUMN course_id SET DEFAULT nextval('public.courses_course_id_seq'::regclass);


--
-- Name: education_sub_theme id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.education_sub_theme ALTER COLUMN id SET DEFAULT nextval('public.education_sub_theme_id_seq'::regclass);


--
-- Name: education_themes id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.education_themes ALTER COLUMN id SET DEFAULT nextval('public.education_themes_id_seq'::regclass);


--
-- Name: extracurricular_categories id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.extracurricular_categories ALTER COLUMN id SET DEFAULT nextval('public.extracurricular_categories_id_seq'::regclass);


--
-- Name: extracurricular_recordings id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.extracurricular_recordings ALTER COLUMN id SET DEFAULT nextval('public.extracurricular_recordings_id_seq'::regclass);


--
-- Name: extracurricular_tags id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.extracurricular_tags ALTER COLUMN id SET DEFAULT nextval('public.extracurricular_tags_id_seq'::regclass);


--
-- Name: grades grade_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.grades ALTER COLUMN grade_id SET DEFAULT nextval('public.grades_grade_id_seq'::regclass);


--
-- Name: notice_recipients recipient_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notice_recipients ALTER COLUMN recipient_id SET DEFAULT nextval('public.notice_recipients_recipient_id_seq'::regclass);


--
-- Name: notice_types type_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notice_types ALTER COLUMN type_id SET DEFAULT nextval('public.notice_types_type_id_seq'::regclass);


--
-- Name: notices notice_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notices ALTER COLUMN notice_id SET DEFAULT nextval('public.notices_notice_id_seq'::regclass);


--
-- Name: resources id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.resources ALTER COLUMN id SET DEFAULT nextval('public.resources_id_seq'::regclass);


--
-- Name: schedules schedule_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.schedules ALTER COLUMN schedule_id SET DEFAULT nextval('public.schedules_schedule_id_seq'::regclass);


--
-- Name: student_statistics id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.student_statistics ALTER COLUMN id SET DEFAULT nextval('public.student_statistics_id_seq'::regclass);


--
-- Name: teacher_class id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teacher_class ALTER COLUMN id SET DEFAULT nextval('public.teacher_class_id_seq'::regclass);


--
-- Name: teacher_tools id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teacher_tools ALTER COLUMN id SET DEFAULT nextval('public.teacher_tools_id_seq'::regclass);


--
-- Name: teachers teacher_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teachers ALTER COLUMN teacher_id SET DEFAULT nextval('public.teachers_teacher_id_seq'::regclass);


--
-- Name: teaching_categories id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_categories ALTER COLUMN id SET DEFAULT nextval('public.teaching_categories_id_seq'::regclass);


--
-- Name: teaching_resource_types id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_resource_types ALTER COLUMN id SET DEFAULT nextval('public.teaching_resource_types_id_seq'::regclass);


--
-- Name: teaching_resources id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_resources ALTER COLUMN id SET DEFAULT nextval('public.teaching_resources_id_seq'::regclass);


--
-- Name: teaching_subcategories id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_subcategories ALTER COLUMN id SET DEFAULT nextval('public.teaching_subcategories_id_seq'::regclass);


--
-- Name: terms term_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.terms ALTER COLUMN term_id SET DEFAULT nextval('public.terms_term_id_seq'::regclass);


--
-- Name: theme_contents id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.theme_contents ALTER COLUMN id SET DEFAULT nextval('public.theme_contents_id_seq'::regclass);


--
-- Name: time_slots slot_id; Type: DEFAULT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.time_slots ALTER COLUMN slot_id SET DEFAULT nextval('public.time_slots_slot_id_seq'::regclass);


--
-- Name: users id; Type: DEFAULT; Schema: public; Owner: zf
--

ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);


--
-- Data for Name: activities; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.activities (id, title, start_date, end_date, total_days, created_by, created_at, address, start_time, registration_deadline, target_audience, is_free, publish_time, description, updated_at, base_id, base_name, max_participants, current_participants, creator_id) FROM stdin;
1	秋季运动会2025	2025-10-25	2025-10-27	3	\N	2025-10-28 16:24:29.463606	学校东校区操场	09:00:00	2025-10-24 18:00:00	全体师生	t	2025-10-18 10:00:00	学校年度秋季运动会，包含田径、球类等项目	2025-10-28 16:24:29.463606	2	\N	100	0	1
2	读书分享会2025	2025-10-20	2025-11-10	22	\N	2025-10-28 16:24:29.463606	学校图书馆三楼报告厅	09:00:00	2025-10-19 18:00:00	全体师生	t	2025-10-13 10:00:00	每周读书分享交流活动	2025-10-28 16:24:29.463606	1	\N	50	0	1
3	篮球训练营2025	2025-10-15	2025-11-05	22	\N	2025-10-28 16:24:29.463606	学校西校区篮球场	09:00:00	2025-10-14 18:00:00	全体师生	t	2025-10-08 10:00:00	篮球基础技能训练和提高	2025-10-28 16:24:29.463606	2	\N	30	0	1
4	科学实验周2025	2025-10-28	2025-11-03	7	\N	2025-10-28 16:24:29.463606	学校南校区实验楼	09:00:00	2025-10-27 18:00:00	全体师生	t	2025-10-21 10:00:00	物理化学趣味实验体验	2025-10-28 16:24:29.463606	3	\N	40	0	1
6	编程俱乐部2025	2025-10-22	2025-11-08	18	\N	2025-10-28 16:24:29.463606	学校南校区计算机中心	09:00:00	2025-10-21 18:00:00	全体师生	t	2025-10-15 10:00:00	编程学习和项目实践	2025-10-28 16:24:29.463606	3	\N	60	0	1
7	历史文化讲座2024	2024-04-10	2024-04-10	1	\N	2025-10-29 13:49:22.625074	学校图书馆报告厅	14:00:00	2024-04-05 18:00:00	文科学生	t	2024-03-25 10:00:00	中国历史文化专题讲座	2025-10-29 13:49:22.625074	1	第一基地	80	65	1
8	校园音乐节2024	2024-05-20	2024-05-22	3	\N	2025-10-29 13:49:22.625074	学校操场	18:00:00	2024-05-15 18:00:00	音乐爱好者	f	2024-05-01 09:00:00	年度校园音乐节表演	2025-10-29 13:49:22.625074	2	第二基地	300	280	1
9	编程竞赛2024	2024-06-15	2024-06-16	2	\N	2025-10-29 13:49:22.625074	计算机实验室	09:00:00	2024-06-10 18:00:00	计算机专业学生	t	2024-05-20 14:00:00	校园编程技能大赛	2025-10-29 13:49:22.625074	3	第三基地	50	48	1
10	紧急志愿者招募	2025-10-29	2025-10-29	1	\N	2025-10-29 13:49:22.625074	社区服务中心	08:30:00	2025-10-28 23:59:00	热心同学	t	2025-10-28 09:00:00	社区服务紧急志愿者招募	2025-10-29 13:49:22.625074	2	第二基地	30	15	1
12	学期读书计划	2025-09-01	2026-01-15	137	\N	2025-10-29 13:49:22.625074	图书馆及各教室	09:00:00	2025-12-31 18:00:00	全校师生	t	2025-08-20 09:00:00	本学期读书打卡活动	2025-10-29 13:49:22.625074	1	第一基地	500	235	1
14	热门-名师讲座	2025-11-05	2025-11-05	1	\N	2025-10-29 13:49:22.625074	大礼堂	19:00:00	2025-11-03 18:00:00	全体师生	t	2025-10-25 09:00:00	知名教授专题讲座	2025-10-29 13:49:22.625074	1	第一基地	200	198	1
16	冷门-古籍修复	2025-11-15	2025-11-15	1	\N	2025-10-29 13:49:22.625074	古籍修复室	10:00:00	2025-11-12 18:00:00	历史爱好者	t	2025-10-20 09:00:00	古籍修复技术体验	2025-10-29 13:49:22.625074	1	第一基地	20	3	1
17	冷门-天文观测	2025-11-20	2025-11-20	1	\N	2025-10-29 13:49:22.625074	天文台	20:00:00	2025-11-18 18:00:00	天文爱好者	t	2025-10-25 14:00:00	夜间天文观测活动	2025-10-29 13:49:22.625074	2	第二基地	15	2	1
20	收费-专业培训	2025-11-08	2025-11-15	8	\N	2025-10-29 13:49:22.625074	培训中心	09:00:00	2025-11-05 18:00:00	需要认证的学生	f	2025-10-20 09:00:00	专业技能认证培训	2025-10-29 13:49:22.625074	3	第三基地	40	25	1
21	收费-材料费活动	2025-11-12	2025-11-12	1	\N	2025-10-29 13:49:22.625074	手工教室	14:00:00	2025-11-10 18:00:00	手工爱好者	f	2025-10-28 10:00:00	手工制作材料费活动	2025-10-29 13:49:22.625074	1	第一基地	30	18	1
18	线上-网络课程	2025-11-01	2025-12-31	61	\N	2025-10-29 13:49:22.625074	网络平台	09:00:00	2025-10-31 18:00:00	编程初学者	t	2025-10-15 09:00:00	Python编程在线课程	2025-10-29 13:49:22.625074	1	线上	1000	356	1
11	明日讲座	2025-10-30	2025-10-30	1	\N	2025-10-29 13:49:22.625074	科技楼201	15:00:00	2025-10-29 23:59:00	理工科学生	t	2025-10-28 10:00:00	人工智能前沿技术讲座	2025-10-29 13:49:22.625074	3	第三基地	100	46	1
15	热门-职业规划	2025-11-10	2025-11-10	1	\N	2025-10-29 13:49:22.625074	就业指导中心	14:00:00	2025-11-08 18:00:00	毕业生	t	2025-10-28 10:00:00	职业生涯规划指导	2025-10-29 13:49:22.625074	2	第二基地	50	50	1
22	21313213	2025-10-31	2025-11-29	30	\N	2025-10-29 16:36:30.002217	学校东校区	09:00:00	2025-10-29 16:24:07	全体师生	t	2025-10-29 08:23:59	3213213213	2025-10-29 16:36:30.002227	1	第一基地	50	0	1
19	跨校区-交流活动	2025-11-25	2025-11-27	3	\N	2025-10-29 13:49:22.625074	各校区轮流	09:00:00	2025-11-20 18:00:00	各校区学生	f	2025-10-30 10:00:00	多校区学生交流活动	2025-10-29 13:49:22.625074	2	多个校区	150	91	1
13	年度科研项目	2025-09-10	2026-06-30	294	\N	2025-10-29 13:49:22.625074	科研实验室	09:00:00	2026-03-01 18:00:00	研究生	f	2025-09-01 10:00:00	年度科研创新项目	2025-10-29 13:49:22.625074	3	第三基地	40	23	1
23	测试活动-对象张三	2025-10-31	2025-11-26	27	\N	2025-10-30 22:35:36.507383	学校西校区	09:00:00	2025-10-30 22:35:02	全体师生	t	2025-10-30 14:34:43	测试活动-对象张三	2025-10-30 22:35:36.507396	2	第二基地	50	0	1
\.


--
-- Data for Name: activity_bases; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.activity_bases (id, name, description, address, created_at, contact_person, contact_phone, updated_at) FROM stdin;
1	第一基地	主要教学和活动场地	学校东校区	2025-10-28 17:17:52.134263	\N	\N	\N
2	第二基地	体育和户外活动场地	学校西校区	2025-10-28 17:17:52.134263	\N	\N	\N
3	第三基地	实验室和特殊项目场地	学校南校区	2025-10-28 17:17:52.134263	\N	\N	\N
\.


--
-- Data for Name: activity_categories; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.activity_categories (id, component_name, label, value, display_order, enabled) FROM stdin;
\.


--
-- Data for Name: activity_checkin_images; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.activity_checkin_images (id, checkin_id, image_url, created_at, description, sort_order) FROM stdin;
1	1	/uploads/activity/20251025/sports_opening_1.jpg	\N	\N	\N
2	1	/uploads/activity/20251025/sports_opening_2.jpg	\N	\N	\N
3	7	/uploads/activity/20251027/sports_closing_1.jpg	\N	\N	\N
4	11	/uploads/activity/20251028/chemistry_lab_1.jpg	\N	\N	\N
5	14	/uploads/activity/20251029/physics_exp_1.jpg	\N	\N	\N
6	22	/uploads/activity/20251101/astronomy_1.jpg	\N	\N	\N
7	27	/uploads/activity/20251103/science_show_1.jpg	\N	\N	\N
8	32	/uploads/activity/20251105/basketball_graduation_1.jpg	\N	\N	\N
\.


--
-- Data for Name: activity_checkins; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.activity_checkins (id, activity_id, user_id, check_date, check_time, description, created_at, checkin_type) FROM stdin;
1	1	1	2025-10-25	08:30:00	参加运动会开幕式和100米预赛	2025-10-28 16:26:06.630674	\N
2	3	1	2025-10-25	16:00:00	篮球基础运球训练	2025-10-28 16:26:06.630674	\N
4	1	1	2025-10-26	09:00:00	运动会跳远比赛和篮球友谊赛	2025-10-28 16:26:06.634823	\N
5	2	1	2025-10-26	15:00:00	分享《三体》读书心得	2025-10-28 16:26:06.634823	\N
6	6	1	2025-10-26	10:30:00	Python基础语法学习	2025-10-28 16:26:06.634823	\N
7	1	1	2025-10-27	10:00:00	运动会闭幕式和颁奖典礼	2025-10-28 16:26:06.635707	\N
8	3	1	2025-10-27	17:00:00	篮球投篮技巧训练	2025-10-28 16:26:06.635707	\N
10	2	1	2025-10-28	14:00:00	讨论《百年孤独》文学价值	2025-10-28 16:26:06.636063	\N
11	4	1	2025-10-28	09:30:00	化学变色实验和安全规范	2025-10-28 16:26:06.636063	\N
12	6	1	2025-10-28	16:30:00	Web开发基础入门	2025-10-28 16:26:06.636063	\N
13	3	1	2025-10-29	15:00:00	篮球防守战术演练	2025-10-28 16:26:06.636345	\N
14	4	1	2025-10-29	10:00:00	物理力学实验演示	2025-10-28 16:26:06.636345	\N
16	2	1	2025-10-30	15:30:00	诗歌创作技巧分享	2025-10-28 16:26:06.636641	\N
17	4	1	2025-10-30	11:00:00	生物显微镜观察实验	2025-10-28 16:26:06.636641	\N
18	6	1	2025-10-30	17:00:00	数据库设计原理	2025-10-28 16:26:06.636641	\N
19	3	1	2025-10-31	16:00:00	篮球比赛实战演练	2025-10-28 16:26:06.636952	\N
21	2	1	2025-11-01	14:00:00	科幻小说专题讨论	2025-10-28 16:26:06.637182	\N
22	4	1	2025-11-01	10:30:00	天文观测活动	2025-10-28 16:26:06.637182	\N
23	6	1	2025-11-01	16:00:00	前端框架学习	2025-10-28 16:26:06.637182	\N
24	3	1	2025-11-02	09:00:00	篮球体能训练	2025-10-28 16:26:06.6375	\N
26	2	1	2025-11-03	15:00:00	历史类书籍分享	2025-10-28 16:26:06.637748	\N
27	4	1	2025-11-03	11:00:00	科学实验成果展示	2025-10-28 16:26:06.637748	\N
28	6	1	2025-11-03	17:30:00	项目实战开发	2025-10-28 16:26:06.637748	\N
29	3	1	2025-11-04	15:30:00	篮球技巧考核	2025-10-28 16:26:06.638115	\N
31	2	1	2025-11-05	16:00:00	文学经典解读	2025-10-28 16:26:06.638341	\N
32	3	1	2025-11-05	10:00:00	篮球训练营结业典礼	2025-10-28 16:26:06.638341	\N
33	6	1	2025-11-05	13:30:00	编程项目答辩	2025-10-28 16:26:06.638341	\N
42	3	1	2025-10-28	18:11:55.721	123321	2025-10-28 18:11:55.720806	\N
44	2	1	2025-10-29	09:34:52.286	测试打卡123	2025-10-29 09:34:52.286374	\N
48	3	1	2025-10-30	22:30:30.342	测试测试测试	2025-10-30 22:30:30.342241	\N
50	13	101	2025-10-30	22:34:12.365	1122333	2025-10-30 22:34:12.365273	\N
\.


--
-- Data for Name: activity_participants; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.activity_participants (id, activity_id, user_id, joined_at, signup_time, created_at, remark, updated_at) FROM stdin;
1	1	1	2025-10-20 09:00:00	\N	\N	\N	\N
2	2	1	2025-10-21 10:00:00	\N	\N	\N	\N
3	3	1	2025-10-18 14:00:00	\N	\N	\N	\N
4	4	1	2025-10-25 16:00:00	\N	\N	\N	\N
6	6	1	2025-10-23 15:00:00	\N	\N	\N	\N
7	19	1	2025-10-29 14:20:49.512032	2025-10-29 14:20:49.536628	\N	\N	\N
8	11	1	2025-10-29 14:52:31.940292	2025-10-29 14:52:31.960075	\N	\N	\N
9	15	1	2025-10-29 14:52:41.327109	2025-10-29 14:52:41.331377	\N	\N	\N
10	19	101	2025-10-30 21:41:38.440776	2025-10-30 21:41:38.464682	\N	\N	\N
11	13	101	2025-10-30 22:26:43.279328	2025-10-30 22:26:43.284839	\N	\N	\N
\.


--
-- Data for Name: chat_conversations; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.chat_conversations (id, type, title, created_by, created_at, updated_at) FROM stdin;
\.


--
-- Data for Name: chat_messages; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.chat_messages (id, conversation_id, sender_id, message_type, content, created_at) FROM stdin;
\.


--
-- Data for Name: chat_participants; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.chat_participants (id, conversation_id, user_id, role, joined_at) FROM stdin;
\.


--
-- Data for Name: check_in_activities; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.check_in_activities (id, checked_days, end_date, is_checked, start_date, title, total_days) FROM stdin;
\.


--
-- Data for Name: check_in_images; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.check_in_images (id, image_url, record_id) FROM stdin;
\.


--
-- Data for Name: check_in_records; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.check_in_records (id, check_date, check_time, description, activity_id) FROM stdin;
\.


--
-- Data for Name: classes; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.classes (class_id, class_name, head_teacher, student_count, grade_id) FROM stdin;
1	一班	张老师	35	1
2	二班	李老师	32	1
3	一班	王老师	38	2
4	二班	赵老师	36	2
5	一班	钱老师	34	3
6	二班	孙老师	37	3
7	一班	周老师	33	4
8	二班	吴老师	35	4
9	一班	郑老师	36	5
10	二班	王老师	34	5
11	一班	李老师	37	6
12	二班	张老师	35	6
\.


--
-- Data for Name: classrooms; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.classrooms (classroom_id, room_number, building, capacity) FROM stdin;
1	201教室	\N	\N
2	203教室	\N	\N
3	205教室	\N	\N
4	实验室1	\N	\N
5	实验室2	\N	\N
\.


--
-- Data for Name: course_categories; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.course_categories (id, name, icon, category_type, display_order, created_at, updated_at) FROM stdin;
1	语文课程	Notebook	all	1	2025-09-08 07:54:33.253505	\N
2	数学课程	DataAnalysis	all	2	2025-09-08 07:54:33.253505	\N
3	英语课程	Reading	all	3	2025-09-08 07:54:33.253505	\N
4	科学课程	Setting	all	4	2025-09-08 07:54:33.253505	\N
5	编程入门	VideoPlay	popular	1	2025-09-08 07:54:33.253505	\N
6	人工智能	DataAnalysis	popular	2	2025-09-08 07:54:33.253505	\N
7	名师讲堂	VideoPlay	featured	1	2025-09-08 07:54:33.253505	\N
8	精品微课	Notebook	featured	2	2025-09-08 07:54:33.253505	\N
\.


--
-- Data for Name: course_items; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.course_items (id, category_id, name, icon, is_featured, created_at) FROM stdin;
1	1	语文课程1	Document	f	2025-09-08 07:54:33.257851
2	1	语文课程2	Document	f	2025-09-08 07:54:33.257851
3	1	语文课程3	Document	f	2025-09-08 07:54:33.257851
4	2	数学课程1	Document	f	2025-09-08 07:54:33.257851
5	2	数学课程2	Document	f	2025-09-08 07:54:33.257851
6	3	英语课程1	Document	f	2025-09-08 07:54:33.257851
7	3	英语课程2	Document	f	2025-09-08 07:54:33.257851
8	3	英语课程3	Document	f	2025-09-08 07:54:33.257851
9	4	科学课程1	Document	f	2025-09-08 07:54:33.257851
10	4	科学课程2	Document	f	2025-09-08 07:54:33.257851
11	5	Python基础	Document	f	2025-09-08 07:54:33.257851
12	5	JavaScript入门	Document	f	2025-09-08 07:54:33.257851
13	6	机器学习基础	Document	f	2025-09-08 07:54:33.257851
14	6	深度学习实践	Document	f	2025-09-08 07:54:33.257851
15	7	王老师语文课	Document	f	2025-09-08 07:54:33.257851
16	7	张老师数学课	Document	f	2025-09-08 07:54:33.257851
17	8	写作技巧	Document	f	2025-09-08 07:54:33.257851
18	8	解题方法	Document	f	2025-09-08 07:54:33.257851
\.


--
-- Data for Name: course_recordings; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.course_recordings (id, thumbnail_url, title, start_time, end_time, class_name, description, video_url, created_at, updated_at) FROM stdin;
1	https://images.unsplash.com/photo-1470114716159-e389f8712fda?w=600	语文课 - 古诗词鉴赏	2024-03-15 09:00:00	2024-03-15 10:30:00	一年级一班	本节课主要讲解唐代诗人李白的《静夜思》和《望庐山瀑布》，分析诗歌意境和艺术特色。	https://example.com/video1	2025-09-08 08:36:37.94923	2025-09-08 08:36:37.94923
2	https://images.unsplash.com/photo-1470114716159-e389f8712fda?w=600	数学课 - 加减法运算	2024-03-16 10:00:00	2024-03-16 11:30:00	一年级一班	本节课主要讲解20以内的加减法运算技巧和应用题解法。	https://example.com/video2	2025-09-08 08:36:37.94923	2025-09-08 08:36:37.94923
3	https://images.unsplash.com/photo-1470114716159-e389f8712fda?w=600	英语课 - 日常问候语	2024-03-17 14:00:00	2024-03-17 15:30:00	一年级一班	本节课学习基本的英语问候语和简单对话，培养学生英语交流能力。	https://example.com/video3	2025-09-08 08:36:37.94923	2025-09-08 08:36:37.94923
\.


--
-- Data for Name: courses; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.courses (course_id, course_name, category, credit) FROM stdin;
1	机器人编程	科技	1
2	创意绘画	艺术	1
3	篮球训练	体育	1
4	科学实验	科学	1
5	围棋入门	棋类	1
6	测试活动	体育	\N
\.


--
-- Data for Name: education_sub_theme; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.education_sub_theme (id, cover_image, description, label, name, sort_order, theme_id) FROM stdin;
\.


--
-- Data for Name: education_themes; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.education_themes (id, name, label, description, cover_image, is_main, parent_id, sort_order, created_by, created_at, updated_at) FROM stdin;
1	stem_education	STEM教育	科学、技术、工程和数学综合教育	/images/stem.jpg	t	\N	1	1	2025-09-17 17:05:35.572286	2025-09-17 17:05:35.572286
2	arts_culture	艺术文化	传统文化与艺术素养培养	/images/arts.jpg	t	\N	2	1	2025-09-17 17:05:35.572286	2025-09-17 17:05:35.572286
3	physical_health	体育运动	体育健康与团队合作	/images/sports.jpg	t	\N	3	1	2025-09-17 17:05:35.572286	2025-09-17 17:05:35.572286
4	social_practice	社会实践	社会实践活动与志愿服务	/images/social.jpg	t	\N	4	1	2025-09-17 17:05:35.572286	2025-09-17 17:05:35.572286
5	robot_programming	机器人编程	机器人设计与编程基础	/images/robot.jpg	f	1	1	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
6	scientific_experiment	科学实验	趣味科学实验探索	/images/experiment.jpg	f	1	2	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
7	math_modeling	数学建模	数学建模思维训练	/images/math.jpg	f	1	3	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
8	traditional_culture	传统文化	中华传统文化学习	/images/culture.jpg	f	2	1	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
9	music_dance	音乐舞蹈	音乐与舞蹈艺术	/images/music.jpg	f	2	2	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
10	painting_craft	绘画手工	绘画与手工艺制作	/images/painting.jpg	f	2	3	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
11	ball_sports	球类运动	各类球类运动技能	/images/ball.jpg	f	3	1	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
12	track_field	田径运动	田径项目训练	/images/track.jpg	f	3	2	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
13	outdoor_activities	户外活动	户外拓展活动	/images/outdoor.jpg	f	3	3	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
14	community_service	社区服务	社区志愿服务	/images/community.jpg	f	4	1	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
15	environmental_protection	环境保护	环保意识与实践	/images/environment.jpg	f	4	2	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
16	career_experience	职业体验	职业体验活动	/images/career.jpg	f	4	3	1	2025-09-17 17:05:48.87304	2025-09-17 17:05:48.87304
18	 loadData()	 loadData()	 loadData() loadData() loadData() loadData() loadData() loadData() loadData()	http://localhost:8080/uploads/images/20250925160458_3c5fdeb3.webp	f	2	0	1	2025-09-25 16:05:05.758665	2025-09-25 16:05:05.758681
21	爱国主题	爱国主题	爱党爱国爱党爱国爱党爱国爱党爱国爱党爱国	http://localhost:8080/uploads/images/20250926131659_fd1212eb.webp	f	1	0	1	2025-09-26 13:17:35.250959	2025-09-26 13:17:35.250969
17	测试主题	测试主题	这是测试主题，测试内容是测试主题名称不能够重复	http://localhost:8080/uploads/images/20250925160410_8016ba5e.webp	f	2	0	1	2025-09-25 16:04:18.175217	2025-09-29 11:42:58.297109
\.


--
-- Data for Name: extracurricular_categories; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.extracurricular_categories (id, name, description, icon, sort_order) FROM stdin;
1	艺术创意	绘画、手工、舞蹈、音乐等艺术类活动	palette	1
2	体育运动	各类体育活动和健康锻炼	sports	2
3	科学技术	编程、机器人、科学实验等科技活动	science	3
4	社会实践	社区服务、环保活动、职业体验等	social	4
5	语言文化	戏剧表演、诗歌朗诵、文化交流等	language	5
8	创新竞赛	各类创新创意比赛和挑战活动	competition	6
9	户外探索	自然观察、户外拓展、探险活动	outdoor	7
10	生活技能	烹饪、园艺、手工制作等生活技能	life-skill	8
\.


--
-- Data for Name: extracurricular_recordings; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.extracurricular_recordings (id, teacher_id, term_id, class_id, title, description, category, activity_date, start_time, end_time, total_minutes, thumbnail_url, video_url, document_url, activity_type, location, participant_count, is_published, is_featured, view_count, like_count, created_by, created_at, updated_at, achievement_description, approval_status, award_info, photo_album_url, share_count, student_works_url, updated_by) FROM stdin;
1	1	1	1	创意绘画工作坊 - 春天的色彩	引导学生用色彩表达对春天的感受，培养艺术创造力和色彩感知能力。学生创作了30幅富有创意的春天主题作品。	艺术创意	2024-03-20	14:00:00	15:30:00	90	/thumbnails/spring-painting.jpg	https://video.example.com/spring-painting.mp4	/documents/painting-workshop-plan.pdf	workshop	美术教室	25	t	t	156	42	1	2025-09-18 13:25:58.433034	2025-09-18 13:25:58.433034	\N	\N	\N	\N	\N	\N	\N
2	1	1	2	机器人编程入门体验课	学习基础编程逻辑，体验机器人搭建和控制的乐趣。学生成功搭建并编程控制简单的机器人，展示了良好的团队合作精神。	科学技术	2024-03-22	15:00:00	16:30:00	90	/thumbnails/robotics-workshop.jpg	https://video.example.com/robotics-workshop.mp4	/documents/robotics-lesson-plan.pdf	workshop	科技实验室	20	t	t	234	78	1	2025-09-18 13:25:58.433034	2025-09-18 13:25:58.433034	\N	\N	\N	\N	\N	\N	\N
3	2	1	1	校园趣味运动会	组织多样化的趣味体育项目，促进学生体育锻炼和团队协作。成功举办校园运动会，学生积极参与。	体育运动	2024-04-10	09:00:00	11:30:00	150	/thumbnails/sports-day.jpg	https://video.example.com/sports-day.mp4	/documents/sports-event-plan.pdf	competition	学校操场	120	t	f	189	56	2	2025-09-18 13:25:58.433034	2025-09-18 13:25:58.433034	\N	\N	\N	\N	\N	\N	\N
4	3	1	3	社区环保志愿服务	组织学生参与社区环境保护活动，培养社会责任感和环保意识。学生积极参与垃圾分类和环境清洁。	社会实践	2024-04-15	13:30:00	16:00:00	150	/thumbnails/community-service.jpg	https://video.example.com/community-service.mp4	/documents/environment-protection-guide.pdf	volunteer	阳光社区公园	35	t	t	201	67	3	2025-09-18 13:25:58.433034	2025-09-18 13:25:58.433034	\N	\N	\N	\N	\N	\N	\N
5	1	1	2	英语戏剧表演《小王子》	通过戏剧表演形式学习英语，提高语言表达能力和舞台表现力。学生成功演绎英文话剧。	语言文化	2024-04-18	14:00:00	15:30:00	90	/thumbnails/english-drama.jpg	https://video.example.com/english-drama.mp4	/documents/drama-script.pdf	performance	学校礼堂	15	t	f	178	45	1	2025-09-18 13:25:58.433034	2025-09-18 13:25:58.433034	\N	\N	\N	\N	\N	\N	\N
6	4	1	4	科技创新大赛准备 workshop	指导学生准备科技创新项目，培养创新思维和实践能力。学生设计了多个创新项目。	创新竞赛	2024-04-25	15:00:00	17:00:00	120	/thumbnails/innovation-contest.jpg	https://video.example.com/innovation-contest.mp4	/documents/innovation-project-guide.pdf	competition	创客空间	18	t	t	167	39	4	2025-09-18 13:25:58.433034	2025-09-18 13:25:58.433034	\N	\N	\N	\N	\N	\N	\N
\.


--
-- Data for Name: extracurricular_tags; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.extracurricular_tags (id, recording_id, tag_name, created_at) FROM stdin;
25	1	创意绘画	2025-09-18 13:26:04.83919
26	1	色彩艺术	2025-09-18 13:26:04.83919
27	1	春天主题	2025-09-18 13:26:04.83919
28	2	机器人编程	2025-09-18 13:26:04.83919
29	2	STEM教育	2025-09-18 13:26:04.83919
30	2	科技创新	2025-09-18 13:26:04.83919
31	3	体育运动	2025-09-18 13:26:04.83919
32	3	团队协作	2025-09-18 13:26:04.83919
33	3	健康锻炼	2025-09-18 13:26:04.83919
34	4	社会实践	2025-09-18 13:26:04.83919
35	4	环保志愿	2025-09-18 13:26:04.83919
36	4	社区服务	2025-09-18 13:26:04.83919
37	5	英语戏剧	2025-09-18 13:26:04.83919
38	5	语言学习	2025-09-18 13:26:04.83919
39	5	表演艺术	2025-09-18 13:26:04.83919
40	6	科技创新	2025-09-18 13:26:04.83919
41	6	竞赛准备	2025-09-18 13:26:04.83919
42	6	项目实践	2025-09-18 13:26:04.83919
\.


--
-- Data for Name: grades; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.grades (grade_id, grade_name, description, sort_order) FROM stdin;
1	一年级	\N	\N
2	二年级	\N	\N
3	三年级	\N	\N
4	四年级	\N	\N
5	五年级	\N	\N
6	六年级	\N	\N
\.


--
-- Data for Name: notice_recipients; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.notice_recipients (recipient_id, notice_id, recipient_type, target_id, read_status, read_at, created_at) FROM stdin;
5	5	class	1	t	2025-10-31 11:50:27.907345	2025-10-30 14:18:04.762472
1	1	class	1	t	2025-10-31 12:29:27.500723	2025-10-30 11:51:57.263167
2	2	class	1	t	2025-10-31 12:29:29.479442	2025-10-30 11:51:57.263167
3	3	class	1	t	2025-10-31 12:29:31.603125	2025-10-30 11:51:57.263167
\.


--
-- Data for Name: notice_types; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.notice_types (type_id, type_name, description, created_at) FROM stdin;
1	课程通知	与课程安排、调课、补课相关的通知	2025-10-30 11:47:46.921529
2	作业通知	作业发布、提交提醒等通知	2025-10-30 11:47:46.921529
3	考试通知	考试安排、成绩公布等通知	2025-10-30 11:47:46.921529
4	活动通知	学校活动、班级活动通知	2025-10-30 11:47:46.921529
5	系统通知	系统维护、功能更新等通知	2025-10-30 11:47:46.921529
6	紧急通知	需要紧急处理的重大事项通知	2025-10-30 11:47:46.921529
\.


--
-- Data for Name: notices; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.notices (notice_id, title, type_id, description, content, schedule_id, created_by, created_at, updated_at) FROM stdin;
1	关于下周数学课程调整的通知	1	数学课时间调整提醒	各位同学：因教师培训安排，原定于下周二的数学课调整为周三下午第3节上课，请同学们准时到教室。	\N	1	2025-10-30 11:51:46.714554	2025-10-30 11:51:46.714554
2	期中考试安排通知	3	期中考试时间地点安排	一年级一班期中考试安排如下：\\n时间：2025年11月15日 上午9:00-11:00\\n地点：教学楼201教室\\n请同学们提前准备，准时参加。	\N	1	2025-10-30 11:51:46.714554	2025-10-30 11:51:46.714554
3	班级实践活动通知	4	参观科技馆活动安排	班级定于2025年11月20日组织参观科技馆实践活动。\\n集合时间：上午8:30\\n集合地点：学校正门\\n要求：统一穿校服，带好笔记本。	\N	1	2025-10-30 11:51:46.714554	2025-10-30 11:51:46.714554
5	测试通知标题	1	测试通知	测试通知测试通知测试通知测试通知	1	1	2025-10-30 14:18:04.726462	2025-10-30 14:18:04.726473
\.


--
-- Data for Name: resource_types; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.resource_types (code, label, icon) FROM stdin;
all	全部	
material	素材	Picture
micro	微课	VideoPlay
courseware	课件	Document
exam	试卷	Tickets
lesson	教案	Notebook
guide	导学案	Collection
word	Word文档	Document
pdf	PDF文件	DocumentCopy
video	视频文件	VideoPlay
\.


--
-- Data for Name: resources; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.resources (id, name, type, size, file_url, subject, uploader_id, created_at, updated_at, file_type) FROM stdin;
\.


--
-- Data for Name: schedules; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.schedules (schedule_id, term_id, week_day, slot_id, class_id, course_id, teacher_id, classroom_id, activity_type, created_at, specific_date, week_number, display_name) FROM stdin;
1	1	1	5	1	1	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-05	1	机器人编程入门
2	1	2	5	2	2	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-06	1	创意绘画基础
3	1	3	5	3	3	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-07	1	篮球基础训练
4	1	4	5	1	4	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-08	1	趣味科学实验
5	1	5	5	2	5	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-09	1	围棋入门教学
6	1	1	6	3	6	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-12	2	测试活动1
7	1	2	6	1	1	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-13	2	机器人编程进阶
8	1	3	6	2	2	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-14	2	创意绘画创作
9	1	4	6	3	3	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-15	2	篮球技巧训练
10	1	5	6	1	4	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-16	2	化学小实验
11	1	1	5	2	5	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-19	3	围棋策略讲解
12	1	2	5	3	6	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-20	3	测试活动2
13	1	3	5	1	1	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-21	3	机器人项目实践
14	1	4	5	2	2	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-22	3	绘画色彩运用
15	1	5	5	3	3	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-23	3	篮球比赛规则
16	1	1	6	1	4	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-26	4	物理实验探究
17	1	2	6	2	5	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-27	4	围棋实战对弈
18	1	3	6	3	6	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-28	4	测试活动3
19	1	4	6	1	1	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-29	4	机器人竞赛准备
20	1	5	6	2	2	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-08-30	4	风景写生技巧
21	1	1	5	3	3	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-02	5	篮球体能训练
22	1	2	5	1	4	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-03	5	生物实验观察
23	1	3	5	2	5	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-04	5	围棋布局策略
24	1	4	5	3	6	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-05	5	测试活动4
25	1	5	5	1	1	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-06	5	机器人编程挑战
26	1	1	6	2	2	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-09	6	人物肖像绘画
27	1	2	6	3	3	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-10	6	篮球战术分析
28	1	3	6	1	4	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-11	6	天文观测活动
29	1	4	6	2	5	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-12	6	围棋残局解析
30	1	5	6	3	6	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-13	6	测试活动5
31	1	1	5	1	1	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-16	7	机器人编程进阶
32	1	1	6	1	2	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-16	7	创意绘画工坊
33	1	2	5	2	3	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-17	7	篮球技巧提升
34	1	2	6	2	4	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-17	7	科学实验探究
35	1	3	5	3	5	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-18	7	围棋高手对弈
36	1	3	6	3	6	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-18	7	测试活动6
37	1	4	5	1	1	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-19	7	机器人项目展示
38	1	4	6	1	2	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-19	7	绘画作品欣赏
39	1	5	5	2	3	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-20	7	篮球友谊赛
40	1	5	6	2	4	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-20	7	物理现象探索
41	1	1	5	3	5	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-23	8	围棋文化历史
42	1	2	5	1	6	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-24	8	测试活动7
43	1	3	5	2	1	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-25	8	机器人创新设计
44	1	4	5	3	2	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-26	8	绘画色彩理论
45	1	5	5	1	3	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-09-27	8	篮球体能测试
46	1	1	6	2	4	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-07	9	化学实验安全
47	1	2	6	3	5	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-08	9	围棋比赛规则
48	1	3	6	1	6	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-09	9	测试活动8
49	1	4	6	2	1	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-10	9	机器人编程竞赛
50	1	5	6	3	2	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-11	9	素描基础训练
51	1	1	5	1	3	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-14	10	篮球运球技巧
52	1	2	5	2	4	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-15	10	生物多样性研究
53	1	3	5	3	5	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-16	10	围棋战术分析
54	1	4	5	1	6	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-17	10	测试活动9
55	1	5	5	2	1	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-18	10	机器人传感器应用
56	1	1	6	3	2	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-21	11	水彩画技法
57	1	2	6	1	3	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-22	11	篮球投篮训练
58	1	3	6	2	4	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-23	11	环境保护实践
59	1	4	6	3	5	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-24	11	围棋名局欣赏
60	1	5	6	1	6	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-25	11	测试活动10
61	1	1	5	2	1	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-28	12	机器人结构设计
62	1	2	5	3	2	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-29	12	静物写生练习
63	1	3	5	1	3	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-30	12	篮球防守战术
64	1	4	5	2	4	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-10-31	12	科学创新思维
65	1	5	5	3	5	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-01	12	围棋收官技巧
66	1	1	6	1	6	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-04	13	测试活动11
67	1	2	6	2	1	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-05	13	机器人编程优化
68	1	3	6	3	2	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-06	13	油画基础入门
69	1	4	6	1	3	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-07	13	篮球比赛实战
70	1	5	6	2	4	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-08	13	物理原理应用
71	1	1	5	3	5	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-11	14	围棋心理战术
72	1	2	5	1	6	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-12	14	测试活动12
73	1	3	5	2	1	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-13	14	机器人自动化
74	1	4	5	3	2	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-14	14	艺术创作思维
75	1	5	5	1	3	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-15	14	篮球体能考核
76	1	1	6	2	4	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-18	15	科学方法论
77	1	2	6	3	5	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-19	15	围棋比赛准备
78	1	3	6	1	6	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-20	15	测试活动13
79	1	4	6	2	1	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-21	15	机器人项目总结
80	1	5	6	3	2	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-22	15	绘画作品展示
81	1	1	5	1	3	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-25	16	篮球赛季总结
82	1	2	5	2	4	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-26	16	科学成果展示
83	1	3	5	3	5	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-27	16	围棋年终比赛
84	1	4	5	1	6	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-28	16	测试活动14
85	1	5	5	2	1	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-11-29	16	机器人创新展
86	1	1	6	3	2	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-02	17	艺术创作展
87	1	2	6	1	3	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-03	17	篮球友谊联赛
88	1	3	6	2	4	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-04	17	科学知识竞赛
89	1	4	6	3	5	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-05	17	围棋年度决赛
90	1	5	6	1	6	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-06	17	测试活动15
91	1	1	5	2	1	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-09	18	机器人年度展示
92	1	2	5	3	2	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-10	18	绘画作品评选
93	1	3	5	1	3	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-11	18	篮球技巧大赛
94	1	4	5	2	4	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-12	18	科学发明展示
95	1	5	5	3	5	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-13	18	围棋颁奖典礼
96	1	1	6	1	6	1	1	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-16	19	测试活动16
97	1	2	6	2	1	1	2	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-17	19	机器人俱乐部年会
98	1	3	6	3	2	1	3	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-18	19	艺术社团汇演
99	1	4	6	1	3	1	4	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-19	19	篮球社团总结
100	1	5	6	2	4	1	5	ACTIVITY	2025-10-28 14:27:22.172508	2024-12-20	19	科学兴趣班闭幕
\.


--
-- Data for Name: student_statistics; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.student_statistics (id, student_id, term_id, average_score, attendance_rate, honor_evaluation, created_at, updated_at) FROM stdin;
1	101	1	85.5	92	good	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
2	102	1	78	85.5	average	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
3	103	1	92.5	96	excellent	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
4	104	1	88	90.5	good	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
5	105	1	76.5	82	average	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
6	106	1	95	98.5	excellent	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
7	107	1	82	88.5	good	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
8	108	1	79.5	84	average	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
9	109	1	91	94.5	excellent	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
10	110	1	87.5	91	good	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
11	111	1	75	80.5	poor	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
12	112	1	93.5	97	excellent	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
13	113	1	84	89.5	good	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
14	114	1	77.5	83	average	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
15	115	1	90.5	95	excellent	2025-10-30 11:10:29.975137	2025-10-30 11:10:29.975137
\.


--
-- Data for Name: teacher_class; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.teacher_class (teacher_id, class_id, id, created_at) FROM stdin;
1	1	1	\N
1	2	2	\N
2	3	3	\N
2	4	4	\N
3	5	5	\N
3	6	6	\N
4	7	7	\N
4	8	8	\N
5	9	9	\N
5	10	10	\N
6	11	11	\N
6	12	12	\N
\.


--
-- Data for Name: teacher_tools; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.teacher_tools (id, name, icon, route_path, sort_order, is_active, created_at) FROM stdin;
1	打卡	Clock	\N	1	t	2025-10-24 17:58:03.047517
2	通知	BellFilled	\N	2	t	2025-10-24 17:58:03.047517
3	请假	DocumentDelete	\N	3	t	2025-10-24 17:58:03.047517
4	课程表	Calendar	\N	4	t	2025-10-24 17:58:03.047517
5	资源库	FolderOpened	\N	5	t	2025-10-24 17:58:03.047517
6	教师评价	StarFilled	\N	6	t	2025-10-24 17:58:03.047517
7	问卷调查	DocumentChecked	\N	7	t	2025-10-24 17:58:03.047517
8	活动管理	Operation	\N	8	t	2025-10-24 17:58:03.047517
9	成果管理	Trophy	\N	9	t	2025-10-24 17:58:03.047517
10	班级管理	School	\N	10	t	2025-10-24 17:58:03.047517
\.


--
-- Data for Name: teachers; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.teachers (teacher_id, teacher_name, title, specialty) FROM stdin;
1	张老师	高级教师	数学
2	李老师	一级教师	语文
3	王老师	特级教师	英语
4	赵老师	高级教师	物理教育
5	钱老师	一级教师	美术教育
6	孙老师	体育教师	体育教育
7	周老师	音乐教师	音乐教育
8	吴老师	信息技术教师	计算机科学
\.


--
-- Data for Name: teaching_categories; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.teaching_categories (id, grade_id, name, icon, sort_order, created_at, updated_at) FROM stdin;
1	1	艺术创想	Brush	1	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
2	1	音乐乐园	Headset	2	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
3	1	体育游戏	Basketball	3	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
4	1	科学探索	Search	4	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
5	1	语言表演	Microphone	5	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
6	2	绘画天地	Picture	1	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
7	2	舞蹈世界	Star	2	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
8	2	球类运动	Football	3	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
9	2	机器人编程	CPU	4	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
10	2	戏剧表演	Film	5	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
11	3	书法艺术	Pen	1	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
12	3	合唱团	Headset	2	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
13	3	武术训练	Boxing	3	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
14	3	科学实验	Chemical	4	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
15	3	英语话剧	Reading	5	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
16	4	手工制作	Tools	1	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
17	4	乐器演奏	Headset	2	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
18	4	田径运动	Trophy	3	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
19	4	3D打印	Printer	4	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
20	4	播音主持	Microphone	5	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
21	5	摄影技巧	Camera	1	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
22	5	音乐创作	Headset	2	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
23	5	篮球训练	Basketball	3	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
24	5	航模制作	Aircraft	4	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
25	5	辩论技巧	Chat	5	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
26	6	动漫设计	Monitor	1	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
27	6	舞蹈编排	Star	2	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
28	6	足球训练	Football	3	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
29	6	人工智能	CPU	4	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
30	6	演讲表达	Microphone	5	2025-10-24 18:24:16.311154	2025-10-24 18:24:16.311154
\.


--
-- Data for Name: teaching_resource_types; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.teaching_resource_types (id, name, code, icon, sort_order) FROM stdin;
1	全部	all	All	0
2	课件	document	Document	1
3	试卷	exam	Exam	2
4	导学案	guide	Guide	3
5	教案	lesson_plan	LessonPlan	4
6	素材	material	Material	5
7	微课	micro_course	MicroCourse	6
\.


--
-- Data for Name: teaching_resources; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.teaching_resources (id, subcategory_id, type_id, title, description, file_url, file_size, cover_image, subject, uploader_id, download_count, view_count, is_recommended, created_at, updated_at) FROM stdin;
1	4	6	手工材料图库	各种手工材料图片参考	/uploads/handcraft-materials.zip	12.3MB	/images/material-gallery.jpg	手工	1	167	423	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
2	4	4	手工制作导学	学生自主学习指导方案	/uploads/handcraft-guide.docx	1.9MB	/images/guide.jpg	手工	1	134	345	f	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
3	4	2	手工制作课件	手工课程完整课件	/uploads/handcraft-courseware.pdf	2.8MB	/images/handcraft-courseware.jpg	手工	1	178	445	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
4	5	7	色彩搭配微课	短视频讲解色彩搭配技巧	/uploads/color-micro-course.mp4	28.5MB	/images/micro-course.jpg	艺术	1	201	523	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
5	5	6	绘画素材包	丰富的绘画参考素材集合	/uploads/painting-materials.zip	15.8MB	/images/materials.jpg	艺术	1	189	467	f	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
6	5	5	创意绘画教学方案	详细的教学步骤和活动设计	/uploads/painting-lesson-plan.docx	2.1MB	/images/lesson-plan.jpg	艺术	1	156	389	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
7	5	2	儿童创意绘画课件	完整的创意绘画教学课件	/uploads/painting-courseware.pdf	3.2MB	/images/painting-courseware.jpg	艺术	1	234	567	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
8	8	6	音乐资源包	游戏用音乐和音效素材	/uploads/music-materials.zip	8.7MB	/images/music-materials.jpg	音乐	1	167	423	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
9	8	5	音乐活动方案	音乐游戏活动详细方案	/uploads/music-lesson-plan.docx	2.2MB	/images/music-lesson.jpg	音乐	1	123	312	f	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
10	8	2	音乐游戏课件	趣味音乐游戏教学课件	/uploads/music-game-courseware.pdf	2.9MB	/images/music-courseware.jpg	音乐	1	145	378	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
11	41	4	表演学习指南	表演技巧自主学习指导	/uploads/acting-guide.pdf	2.1MB	/images/acting-guide.jpg	戏剧	1	156	389	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
12	41	5	表演课程教案	表演教学详细教案	/uploads/acting-lesson-plan.docx	2.3MB	/images/acting-lesson.jpg	戏剧	1	145	367	f	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
13	41	2	表演艺术课件	基础表演技巧课件	/uploads/acting-courseware.pdf	3.1MB	/images/acting-courseware.jpg	戏剧	1	178	456	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
14	46	6	书法字帖	练习用书法字帖素材	/uploads/calligraphy-copybook.pdf	3.2MB	/images/copybook.jpg	书法	1	178	467	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
15	46	5	书法课程教案	书法教学详细方案	/uploads/calligraphy-lesson-plan.docx	2.1MB	/images/calligraphy-lesson.jpg	书法	1	134	345	f	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
16	46	2	书法教学课件	硬笔书法技巧课件	/uploads/calligraphy-courseware.pdf	2.8MB	/images/calligraphy-courseware.jpg	书法	1	156	423	t	2025-10-24 18:38:28.38607	2025-10-24 18:38:28.38607
17	4	7	折纸艺术微课	基础折纸技巧视频教学	/uploads/origami-micro-course.mp4	25.7MB	/images/origami-video.jpg	手工	1	178	456	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
18	4	4	手工制作导学	学生自主手工学习指导	/uploads/handcraft-learning-guide.docx	2.1MB	/images/learning-guide.jpg	手工	1	134	345	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
19	4	2	环保手工课件	环保主题手工制作课件	/uploads/eco-handcraft.pdf	3.1MB	/images/eco-handcraft.jpg	手工	1	167	423	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
20	5	6	绘画模板素材	各种绘画模板和参考图	/uploads/painting-templates.zip	10.2MB	/images/templates.jpg	艺术	1	201	523	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
21	5	5	创意绘画活动教案	创意绘画课堂活动设计	/uploads/creative-painting-lesson.docx	2.3MB	/images/creative-lesson.jpg	艺术	1	156	389	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
22	5	2	儿童色彩认知课件	帮助孩子认识色彩的课件	/uploads/color-recognition.pdf	2.8MB	/images/color-recognition.jpg	艺术	1	189	467	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
23	8	6	游戏音效包	音乐游戏所需音效素材	/uploads/game-sounds.zip	6.8MB	/images/game-sounds.jpg	音乐	1	167	423	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
24	9	5	歌曲教学方案	儿童歌曲教学详细教案	/uploads/song-teaching.docx	2.2MB	/images/song-teaching.jpg	音乐	1	123	312	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
25	10	2	音乐节奏课件	节奏感训练教学课件	/uploads/rhythm-courseware.pdf	2.9MB	/images/rhythm-courseware.jpg	音乐	1	145	378	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
26	31	2	舞蹈编排课件	舞蹈创作教学课件	/uploads/dance-choreography-course.pdf	2.9MB	/images/dance-choreography-course.jpg	舞蹈	1	156	389	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
27	38	7	算法思维微课	编程算法基础概念	/uploads/algorithm-micro-course.mp4	32.8MB	/images/algorithm-video.jpg	科技	1	234	689	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
28	39	5	机器人教案	机器人搭建课程教案	/uploads/robot-building-lesson.docx	2.6MB	/images/robot-building-lesson.jpg	科技	1	189	467	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
29	40	2	图形化编程课件	积木式编程入门课件	/uploads/block-programming.pdf	3.4MB	/images/block-programming.jpg	科技	1	223	645	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
30	41	2	表演艺术基础	表演基础理论课件	/uploads/acting-basics.pdf	2.7MB	/images/acting-basics.jpg	戏剧	1	156	389	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
31	42	5	台词教学方案	台词表达训练教案	/uploads/dialogue-lesson.docx	2.1MB	/images/dialogue-lesson.jpg	戏剧	1	134	345	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
32	45	7	舞台表演技巧	专业舞台表演教学	/uploads/stage-skills.mp4	38.9MB	/images/stage-skills.jpg	戏剧	1	178	467	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
33	46	2	硬笔书法课件	硬笔书法技巧课件	/uploads/pen-calligraphy-course.pdf	2.7MB	/images/pen-calligraphy-course.jpg	书法	1	156	389	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
34	47	5	毛笔教学方案	毛笔书法入门教案	/uploads/brush-lesson.docx	2.2MB	/images/brush-lesson.jpg	书法	1	134	345	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
35	49	7	书法创作过程	完整书法创作演示	/uploads/calligraphy-creation.mp4	31.5MB	/images/calligraphy-creation.jpg	书法	1	178	467	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
36	51	2	武术基础课件	武术基本功教学课件	/uploads/martial-basics.pdf	2.9MB	/images/martial-basics.jpg	武术	1	145	378	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
37	52	5	拳法教学方案	基础拳法训练教案	/uploads/boxing-lesson.docx	2.3MB	/images/boxing-lesson.jpg	武术	1	123	312	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
38	55	7	武术文化介绍	中国传统武术文化	/uploads/martial-culture-video.mp4	29.7MB	/images/martial-culture-video.jpg	武术	1	167	423	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
39	56	2	物理实验课件	基础物理实验原理	/uploads/physics-experiment.pdf	3.2MB	/images/physics-experiment.jpg	科学	1	178	456	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
40	57	5	化学实验教案	安全化学实验方案	/uploads/chemistry-lesson.docx	2.4MB	/images/chemistry-lesson.jpg	科学	1	156	389	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
41	59	7	创新实验展示	学生创新实验作品	/uploads/innovation-show.mp4	41.3MB	/images/innovation-show.jpg	科学	1	201	589	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
42	61	2	英语剧本课件	英语话剧剧本学习	/uploads/english-script.pdf	2.8MB	/images/english-script.jpg	英语	1	167	423	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
43	62	5	英语发音教案	英语发音训练方案	/uploads/pronunciation-lesson.docx	2.1MB	/images/pronunciation-lesson.jpg	英语	1	145	367	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
44	65	7	话剧排练实录	英语话剧排练过程	/uploads/rehearsal-video.mp4	36.8MB	/images/rehearsal-video.jpg	英语	1	189	523	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
45	66	2	纸艺创作课件	各种纸艺技法教学	/uploads/paper-art-course.pdf	3.1MB	/images/paper-art-course.jpg	手工	1	145	378	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
46	67	5	布艺教学方案	布料手工制作教案	/uploads/fabric-lesson.docx	2.3MB	/images/fabric-lesson.jpg	手工	1	123	312	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
47	68	7	木工安全操作	基础木工工具使用	/uploads/woodworking-safety.mp4	27.9MB	/images/woodworking-safety.jpg	手工	1	167	423	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
48	71	2	钢琴基础课件	钢琴入门教学课件	/uploads/piano-basics-course.pdf	3.3MB	/images/piano-basics-course.jpg	音乐	1	189	523	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
49	72	5	吉他教学方案	吉他弹唱入门教案	/uploads/guitar-lesson.docx	2.4MB	/images/guitar-lesson.jpg	音乐	1	156	389	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
50	75	7	乐队合奏教学	多乐器合奏技巧	/uploads/ensemble-lesson.mp4	39.8MB	/images/ensemble-lesson.jpg	音乐	1	201	589	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
51	76	2	短跑技术课件	短跑技巧教学课件	/uploads/sprinting-technique.pdf	2.8MB	/images/sprinting-technique.jpg	体育	1	167	423	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
52	77	5	跳跃项目教案	跳高跳远训练方案	/uploads/jumping-lesson.docx	2.2MB	/images/jumping-lesson.jpg	体育	1	145	367	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
53	78	7	投掷技术教学	铅球标枪技巧视频	/uploads/throwing-technique.mp4	34.7MB	/images/throwing-technique.jpg	体育	1	178	456	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
54	81	2	3D建模课件	基础3D建模教学	/uploads/3d-modeling-course.pdf	3.5MB	/images/3d-modeling-course.jpg	科技	1	189	523	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
55	82	5	3D打印教案	3D打印技术教学方案	/uploads/3d-printing-lesson.docx	2.5MB	/images/3d-printing-lesson.jpg	科技	1	156	389	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
56	84	7	创意设计过程	3D作品设计全流程	/uploads/3d-design-process.mp4	43.2MB	/images/3d-design-process.jpg	科技	1	201	589	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
57	86	5	英语发音教案	英语发音训练方案	/uploads/pronunciation-lesson.docx	2.1MB	/images/pronunciation-lesson.jpg	英语	1	145	367	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
58	91	2	摄影入门课件	基础摄影知识教学	/uploads/photography-basics-course.pdf	3.2MB	/images/photography-basics-course.jpg	摄影	1	178	456	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
59	92	5	构图教学方案	摄影构图训练教案	/uploads/composition-lesson.docx	2.3MB	/images/composition-lesson.jpg	摄影	1	156	389	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
60	93	7	用光技巧视频	摄影用光实战教学	/uploads/lighting-techniques.mp4	37.9MB	/images/lighting-techniques.jpg	摄影	1	201	589	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
61	101	2	武术基础课件	武术基本功教学课件	/uploads/martial-basics.pdf	2.9MB	/images/martial-basics.jpg	武术	1	145	378	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
62	120	7	书法创作过程	完整书法创作演示	/uploads/calligraphy-creation.mp4	31.5MB	/images/calligraphy-creation.jpg	书法	1	178	467	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
63	126	2	武术基础课件	武术基本功教学课件	/uploads/martial-basics.pdf	2.9MB	/images/martial-basics.jpg	武术	1	145	378	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
64	131	2	人工智能课件	AI基础概念教学	/uploads/ai-basics-course.pdf	3.6MB	/images/ai-basics-course.jpg	科技	1	223	645	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
65	132	5	机器学习教案	机器学习入门教案	/uploads/ml-lesson.docx	2.7MB	/images/ml-lesson.jpg	科技	1	189	523	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
66	133	7	图像识别应用	AI图像识别技术	/uploads/image-recognition.mp4	46.8MB	/images/image-recognition.jpg	科技	1	234	689	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
67	136	2	公众演讲课件	演讲技巧教学课件	/uploads/public-speaking-course.pdf	3.1MB	/images/public-speaking-course.jpg	语言	1	167	423	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
68	137	5	演讲内容教案	演讲内容组织方案	/uploads/speech-content-lesson.docx	2.2MB	/images/speech-content-lesson.jpg	语言	1	145	367	f	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
69	138	7	非语言沟通	肢体语言表达技巧	/uploads/body-language-video.mp4	32.6MB	/images/body-language-video.jpg	语言	1	178	456	t	2025-10-24 18:40:47.39628	2025-10-24 18:40:47.39628
\.


--
-- Data for Name: teaching_subcategories; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.teaching_subcategories (id, category_id, name, sort_order, created_at, updated_at) FROM stdin;
1	1	色彩搭配	5	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
2	1	剪纸艺术	4	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
3	1	黏土艺术	3	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
4	1	手工制作	2	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
5	1	创意绘画	1	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
6	2	音乐欣赏	5	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
7	2	乐器认知	4	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
8	2	音乐游戏	3	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
9	2	歌曲学唱	2	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
10	2	节奏训练	1	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
11	3	团队合作	5	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
12	3	协调训练	4	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
13	3	球类启蒙	3	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
14	3	体操基础	2	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
15	3	趣味游戏	1	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
16	4	发明创造	5	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
17	4	探索活动	4	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
18	4	科学玩具	3	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
19	4	简单实验	2	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
20	4	自然观察	1	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
21	5	表情训练	5	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
22	5	语言游戏	4	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
23	5	角色扮演	3	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
24	5	儿歌表演	2	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
25	5	故事讲述	1	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
26	6	色彩理论	5	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
27	6	漫画创作	4	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
28	6	油画入门	3	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
29	6	素描基础	2	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
30	6	水彩绘画	1	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
31	7	舞蹈编排	5	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
32	7	街舞入门	4	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
33	7	芭蕾基础	3	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
34	7	现代舞蹈	2	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
35	7	民族舞蹈	1	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
36	9	竞赛准备	5	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
37	9	项目制作	4	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
38	9	简单算法	3	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
39	9	机器人搭建	2	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
40	9	积木编程	1	2025-10-24 18:24:21.258134	2025-10-24 18:24:21.258134
41	10	表演基础	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
42	10	台词训练	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
43	10	形体训练	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
44	10	剧本阅读	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
45	10	舞台表演	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
46	11	硬笔书法	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
47	11	毛笔基础	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
48	11	字体练习	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
49	11	作品创作	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
50	11	书法欣赏	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
51	13	基本功训练	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
52	13	拳法学习	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
53	13	器械使用	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
54	13	套路练习	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
55	13	武术文化	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
56	14	物理实验	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
57	14	化学实验	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
58	14	生物实验	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
59	14	创新实验	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
60	14	实验安全	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
61	15	剧本学习	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
62	15	发音训练	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
63	15	角色扮演	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
64	15	舞台英语	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
65	15	演出实践	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
66	16	纸艺制作	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
67	16	布艺创作	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
68	16	木工基础	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
69	16	环保手工	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
70	16	创意设计	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
71	17	钢琴入门	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
72	17	吉他基础	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
73	17	小提琴	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
74	17	民族乐器	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
75	17	合奏训练	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
76	18	短跑训练	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
77	18	跳高跳远	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
78	18	投掷项目	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
79	18	耐力训练	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
80	18	比赛技巧	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
81	19	3D建模	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
82	19	打印技术	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
83	19	材料认知	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
84	19	作品设计	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
85	19	创新应用	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
86	20	发音训练	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
87	20	朗诵技巧	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
88	20	节目主持	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
89	20	新闻播报	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
90	20	现场报道	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
91	21	摄影基础	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
92	21	构图技巧	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
93	21	光线运用	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
94	21	后期处理	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
95	21	主题拍摄	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
96	22	作曲基础	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
97	22	编曲技巧	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
98	22	音乐软件	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
99	22	作品制作	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
100	22	创作灵感	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
101	23	基本功训练	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
102	23	投篮技巧	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
103	23	战术配合	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
104	23	体能训练	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
105	23	比赛策略	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
106	24	模型组装	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
107	24	飞行原理	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
108	24	遥控技术	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
109	24	比赛技巧	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
110	24	创新设计	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
111	25	逻辑思维	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
112	25	论证方法	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
113	25	语言表达	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
114	25	辩论实战	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
115	25	辩题分析	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
116	26	角色设计	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
117	26	场景绘制	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
118	26	动画原理	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
119	26	软件使用	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
120	26	作品创作	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
121	27	编舞基础	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
122	27	音乐选择	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
123	27	队形设计	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
124	27	风格创作	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
125	27	作品展示	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
126	28	基本功训练	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
127	28	传球技巧	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
128	28	射门训练	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
129	28	战术理解	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
130	28	团队配合	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
131	29	AI基础	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
132	29	机器学习	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
133	29	图像识别	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
134	29	语音处理	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
135	29	项目实践	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
136	30	演讲技巧	1	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
137	30	内容组织	2	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
138	30	肢体语言	3	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
139	30	情绪控制	4	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
140	30	实战演练	5	2025-10-24 18:26:40.116349	2025-10-24 18:26:40.116349
\.


--
-- Data for Name: terms; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.terms (term_id, term_name, start_date, end_date, is_current) FROM stdin;
1	2024-2025学年第一学期	2024-09-01	2025-01-31	t
2	2024-2025学年第二学期	2025-02-01	2025-07-31	f
\.


--
-- Data for Name: theme_contents; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.theme_contents (id, theme_id, title, description, content, cover_image, content_type, external_url, sort_order, is_published, created_by, created_at, updated_at) FROM stdin;
1	5	机器人编程入门	学习机器人基础编程知识	<p>欢迎学习机器人编程课程！本课程将带你进入机器人的奇妙世界。</p><p>学习内容：编程基础、传感器使用、机械结构设计等。</p>	/images/robot-course1.jpg	article	\N	1	t	1	2025-09-17 17:05:58.206878	2025-09-17 17:05:58.206878
2	5	LEGO机器人搭建	使用LEGO搭建智能机器人	<p>通过LEGO积木搭建各种功能的机器人模型。</p><p>培养动手能力和创新思维。</p>	/images/robot-course2.jpg	article	\N	2	t	1	2025-09-17 17:05:58.206878	2025-09-17 17:05:58.206878
3	5	编程挑战赛	年度机器人编程比赛	<p>参加我们的年度机器人编程挑战赛！</p><p>展示你的编程技能和创造力。</p>	/images/robot-competition.jpg	activity	\N	3	t	1	2025-09-17 17:05:58.206878	2025-09-17 17:05:58.206878
\.


--
-- Data for Name: time_slots; Type: TABLE DATA; Schema: public; Owner: postgres
--

COPY public.time_slots (slot_id, start_time, end_time, slot_name, sort_order) FROM stdin;
1	08:00:00	08:45:00	第一节	1
2	08:55:00	09:40:00	第二节	2
3	10:00:00	10:45:00	第三节	3
5	14:00:00	14:45:00	第五节	5
7	16:00:00	16:45:00	第七节	7
4	10:55:00	11:40:00	第四节	4
6	14:55:00	15:40:00	第六节	6
\.


--
-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: zf
--

COPY public.users (id, username, password, name, role, student_id, teacher_id, department, major, phone, email, avatar, created_at, class_id, college, specialty, create_time) FROM stdin;
2	teacher_li	password123	李老师	teacher	\N	T002	语文系	\N	13800138002	teacher_li@school.com	/avatars/teacher_li.jpg	2025-10-24 18:49:47.831221	\N	师范大学	汉语言文学	\N
3	teacher_wang	password123	王老师	teacher	\N	T003	英语系	\N	13800138003	teacher_wang@school.com	/avatars/teacher_wang.jpg	2025-10-24 18:49:47.831221	\N	外国语大学	英语教育	\N
4	teacher_zhao	password123	赵老师	teacher	\N	T004	科学系	\N	13800138004	teacher_zhao@school.com	/avatars/teacher_zhao.jpg	2025-10-24 18:49:47.831221	\N	理工大学	物理教育	\N
5	teacher_qian	password123	钱老师	teacher	\N	T005	艺术系	\N	13800138005	teacher_qian@school.com	/avatars/teacher_qian.jpg	2025-10-24 18:49:47.831221	\N	艺术学院	美术教育	\N
6	teacher_sun	password123	孙老师	teacher	\N	T006	体育系	\N	13800138006	teacher_sun@school.com	/avatars/teacher_sun.jpg	2025-10-24 18:49:47.831221	\N	体育大学	体育教育	\N
7	teacher_zhou	password123	周老师	teacher	\N	T007	音乐系	\N	13800138007	teacher_zhou@school.com	/avatars/teacher_zhou.jpg	2025-10-24 18:49:47.831221	\N	音乐学院	音乐教育	\N
8	teacher_wu	password123	吴老师	teacher	\N	T008	技术系	\N	13800138008	teacher_wu@school.com	/avatars/teacher_wu.jpg	2025-10-24 18:49:47.831221	\N	工业大学	计算机科学	\N
1000	admin	admin123	系统管理员	admin	\N	\N	信息技术中心	\N	13800139999	admin@school.com	/avatars/admin.jpg	2025-10-24 18:49:47.842867	\N	\N	\N	\N
101	student_1001	password123	张三	student	S2024001	\N	\N	小学教育	13800138101	student_1001@school.com	/avatars/student_1001.jpg	2025-10-24 18:51:14.67234	1	实验小学	\N	\N
102	student_1002	password123	李四	student	S2024002	\N	\N	小学教育	13800138102	student_1002@school.com	/avatars/student_1002.jpg	2025-10-24 18:51:14.67234	1	实验小学	\N	\N
103	student_1003	password123	王五	student	S2024003	\N	\N	小学教育	13800138103	student_1003@school.com	/avatars/student_1003.jpg	2025-10-24 18:51:14.67234	1	实验小学	\N	\N
104	student_1004	password123	赵六	student	S2024004	\N	\N	小学教育	13800138104	student_1004@school.com	/avatars/student_1004.jpg	2025-10-24 18:51:14.67234	2	实验小学	\N	\N
105	student_1005	password123	钱七	student	S2024005	\N	\N	小学教育	13800138105	student_1005@school.com	/avatars/student_1005.jpg	2025-10-24 18:51:14.67234	2	实验小学	\N	\N
106	student_1006	password123	孙八	student	S2024006	\N	\N	小学教育	13800138106	student_1006@school.com	/avatars/student_1006.jpg	2025-10-24 18:51:14.67234	2	实验小学	\N	\N
107	student_2001	password123	周九	student	S2024007	\N	\N	小学教育	13800138107	student_2001@school.com	/avatars/student_2001.jpg	2025-10-24 18:51:14.67234	3	实验小学	\N	\N
108	student_2002	password123	吴十	student	S2024008	\N	\N	小学教育	13800138108	student_2002@school.com	/avatars/student_2002.jpg	2025-10-24 18:51:14.67234	3	实验小学	\N	\N
109	student_2003	password123	郑十一	student	S2024009	\N	\N	小学教育	13800138109	student_2003@school.com	/avatars/student_2003.jpg	2025-10-24 18:51:14.67234	3	实验小学	\N	\N
110	student_2010	password123	王小明	student	S2024010	\N	\N	小学教育	13800138110	student_2010@school.com	/avatars/student_2010.jpg	2025-10-24 18:51:14.67234	4	实验小学	\N	\N
111	student_2011	password123	李小红	student	S2024011	\N	\N	小学教育	13800138111	student_2011@school.com	/avatars/student_2011.jpg	2025-10-24 18:51:14.67234	4	实验小学	\N	\N
112	student_2012	password123	张伟	student	S2024012	\N	\N	小学教育	13800138112	student_2012@school.com	/avatars/student_2012.jpg	2025-10-24 18:51:14.67234	5	实验小学	\N	\N
113	student_2013	password123	刘洋	student	S2024013	\N	\N	小学教育	13800138113	student_2013@school.com	/avatars/student_2013.jpg	2025-10-24 18:51:14.67234	5	实验小学	\N	\N
114	student_2014	password123	陈静	student	S2024014	\N	\N	小学教育	13800138114	student_2014@school.com	/avatars/student_2014.jpg	2025-10-24 18:51:14.67234	6	实验小学	\N	\N
115	student_2015	password123	杨帆	student	S2024015	\N	\N	小学教育	13800138115	student_2015@school.com	/avatars/student_2015.jpg	2025-10-24 18:51:14.67234	6	实验小学	\N	\N
1	teacher_zhang	password123	张老师	teacher	\N	1	数学系	\N	13800138001	teacher_zhang@school.com	/avatars/teacher_zhang.jpg	2025-10-24 18:49:47.831221	\N	师范大学	数学教育	\N
\.


--
-- Name: activities_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.activities_id_seq', 23, true);


--
-- Name: activities_id_seq1; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.activities_id_seq1', 10, true);


--
-- Name: activity_bases_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.activity_bases_id_seq', 3, true);


--
-- Name: activity_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.activity_categories_id_seq', 1, false);


--
-- Name: activity_checkin_images_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.activity_checkin_images_id_seq', 8, true);


--
-- Name: activity_checkins_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.activity_checkins_id_seq', 50, true);


--
-- Name: activity_participants_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.activity_participants_id_seq', 11, true);


--
-- Name: chat_conversations_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.chat_conversations_id_seq', 1, false);


--
-- Name: chat_messages_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.chat_messages_id_seq', 1, false);


--
-- Name: chat_participants_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.chat_participants_id_seq', 1, false);


--
-- Name: check_in_activities_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.check_in_activities_id_seq', 1, false);


--
-- Name: check_in_images_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.check_in_images_id_seq', 1, false);


--
-- Name: check_in_records_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.check_in_records_id_seq', 1, false);


--
-- Name: classes_class_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.classes_class_id_seq', 1, false);


--
-- Name: classrooms_classroom_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.classrooms_classroom_id_seq', 5, true);


--
-- Name: course_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.course_categories_id_seq', 8, true);


--
-- Name: course_items_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.course_items_id_seq', 18, true);


--
-- Name: course_recordings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.course_recordings_id_seq', 3, true);


--
-- Name: courses_course_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.courses_course_id_seq', 6, true);


--
-- Name: defense_education_activities_id_seq; Type: SEQUENCE SET; Schema: public; Owner: zf
--

SELECT pg_catalog.setval('public.defense_education_activities_id_seq', 311, false);


--
-- Name: education_activities_id_seq; Type: SEQUENCE SET; Schema: public; Owner: zf
--

SELECT pg_catalog.setval('public.education_activities_id_seq', 211, false);


--
-- Name: education_sub_theme_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.education_sub_theme_id_seq', 1, false);


--
-- Name: education_themes_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.education_themes_id_seq', 21, true);


--
-- Name: extracurricular_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.extracurricular_categories_id_seq', 10, true);


--
-- Name: extracurricular_recordings_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.extracurricular_recordings_id_seq', 6, true);


--
-- Name: extracurricular_tags_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.extracurricular_tags_id_seq', 42, true);


--
-- Name: grades_grade_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.grades_grade_id_seq', 1, false);


--
-- Name: notice_recipients_recipient_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.notice_recipients_recipient_id_seq', 5, true);


--
-- Name: notice_types_type_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.notice_types_type_id_seq', 6, true);


--
-- Name: notices_notice_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.notices_notice_id_seq', 5, true);


--
-- Name: resources_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.resources_id_seq', 1, false);


--
-- Name: schedules_schedule_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.schedules_schedule_id_seq', 100, true);


--
-- Name: student_statistics_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.student_statistics_id_seq', 15, true);


--
-- Name: teacher_class_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.teacher_class_id_seq', 12, true);


--
-- Name: teacher_tools_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.teacher_tools_id_seq', 10, true);


--
-- Name: teachers_teacher_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.teachers_teacher_id_seq', 3, true);


--
-- Name: teaching_categories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.teaching_categories_id_seq', 30, true);


--
-- Name: teaching_resource_types_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.teaching_resource_types_id_seq', 8, true);


--
-- Name: teaching_resources_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.teaching_resources_id_seq', 69, true);


--
-- Name: teaching_subcategories_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.teaching_subcategories_id_seq', 140, true);


--
-- Name: terms_term_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.terms_term_id_seq', 2, true);


--
-- Name: theme_contents_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.theme_contents_id_seq', 3, true);


--
-- Name: time_slots_slot_id_seq; Type: SEQUENCE SET; Schema: public; Owner: postgres
--

SELECT pg_catalog.setval('public.time_slots_slot_id_seq', 7, true);


--
-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: zf
--

SELECT pg_catalog.setval('public.users_id_seq', 1, false);


--
-- Name: activities activities_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activities
    ADD CONSTRAINT activities_pkey PRIMARY KEY (id);


--
-- Name: activity_bases activity_bases_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_bases
    ADD CONSTRAINT activity_bases_name_key UNIQUE (name);


--
-- Name: activity_bases activity_bases_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_bases
    ADD CONSTRAINT activity_bases_pkey PRIMARY KEY (id);


--
-- Name: activity_categories activity_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_categories
    ADD CONSTRAINT activity_categories_pkey PRIMARY KEY (id);


--
-- Name: activity_checkin_images activity_checkin_images_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_checkin_images
    ADD CONSTRAINT activity_checkin_images_pkey PRIMARY KEY (id);


--
-- Name: activity_checkins activity_checkins_activity_id_user_id_check_date_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_checkins
    ADD CONSTRAINT activity_checkins_activity_id_user_id_check_date_key UNIQUE (activity_id, user_id, check_date);


--
-- Name: activity_checkins activity_checkins_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_checkins
    ADD CONSTRAINT activity_checkins_pkey PRIMARY KEY (id);


--
-- Name: activity_participants activity_participants_activity_id_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_participants
    ADD CONSTRAINT activity_participants_activity_id_user_id_key UNIQUE (activity_id, user_id);


--
-- Name: activity_participants activity_participants_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_participants
    ADD CONSTRAINT activity_participants_pkey PRIMARY KEY (id);


--
-- Name: chat_conversations chat_conversations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_conversations
    ADD CONSTRAINT chat_conversations_pkey PRIMARY KEY (id);


--
-- Name: chat_messages chat_messages_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_messages
    ADD CONSTRAINT chat_messages_pkey PRIMARY KEY (id);


--
-- Name: chat_participants chat_participants_conversation_id_user_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_participants
    ADD CONSTRAINT chat_participants_conversation_id_user_id_key UNIQUE (conversation_id, user_id);


--
-- Name: chat_participants chat_participants_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_participants
    ADD CONSTRAINT chat_participants_pkey PRIMARY KEY (id);


--
-- Name: check_in_activities check_in_activities_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.check_in_activities
    ADD CONSTRAINT check_in_activities_pkey PRIMARY KEY (id);


--
-- Name: check_in_images check_in_images_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.check_in_images
    ADD CONSTRAINT check_in_images_pkey PRIMARY KEY (id);


--
-- Name: check_in_records check_in_records_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.check_in_records
    ADD CONSTRAINT check_in_records_pkey PRIMARY KEY (id);


--
-- Name: classes classes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.classes
    ADD CONSTRAINT classes_pkey PRIMARY KEY (class_id);


--
-- Name: classrooms classrooms_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.classrooms
    ADD CONSTRAINT classrooms_pkey PRIMARY KEY (classroom_id);


--
-- Name: course_categories course_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_categories
    ADD CONSTRAINT course_categories_pkey PRIMARY KEY (id);


--
-- Name: course_items course_items_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_items
    ADD CONSTRAINT course_items_pkey PRIMARY KEY (id);


--
-- Name: course_recordings course_recordings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_recordings
    ADD CONSTRAINT course_recordings_pkey PRIMARY KEY (id);


--
-- Name: courses courses_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.courses
    ADD CONSTRAINT courses_pkey PRIMARY KEY (course_id);


--
-- Name: education_sub_theme education_sub_theme_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.education_sub_theme
    ADD CONSTRAINT education_sub_theme_pkey PRIMARY KEY (id);


--
-- Name: education_themes education_themes_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.education_themes
    ADD CONSTRAINT education_themes_name_key UNIQUE (name);


--
-- Name: education_themes education_themes_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.education_themes
    ADD CONSTRAINT education_themes_pkey PRIMARY KEY (id);


--
-- Name: extracurricular_categories extracurricular_categories_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.extracurricular_categories
    ADD CONSTRAINT extracurricular_categories_name_key UNIQUE (name);


--
-- Name: extracurricular_categories extracurricular_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.extracurricular_categories
    ADD CONSTRAINT extracurricular_categories_pkey PRIMARY KEY (id);


--
-- Name: extracurricular_recordings extracurricular_recordings_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.extracurricular_recordings
    ADD CONSTRAINT extracurricular_recordings_pkey PRIMARY KEY (id);


--
-- Name: extracurricular_tags extracurricular_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.extracurricular_tags
    ADD CONSTRAINT extracurricular_tags_pkey PRIMARY KEY (id);


--
-- Name: grades grades_grade_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.grades
    ADD CONSTRAINT grades_grade_name_key UNIQUE (grade_name);


--
-- Name: grades grades_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.grades
    ADD CONSTRAINT grades_pkey PRIMARY KEY (grade_id);


--
-- Name: notice_recipients notice_recipients_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notice_recipients
    ADD CONSTRAINT notice_recipients_pkey PRIMARY KEY (recipient_id);


--
-- Name: notice_types notice_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notice_types
    ADD CONSTRAINT notice_types_pkey PRIMARY KEY (type_id);


--
-- Name: notice_types notice_types_type_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notice_types
    ADD CONSTRAINT notice_types_type_name_key UNIQUE (type_name);


--
-- Name: notices notices_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notices
    ADD CONSTRAINT notices_pkey PRIMARY KEY (notice_id);


--
-- Name: resource_types resource_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.resource_types
    ADD CONSTRAINT resource_types_pkey PRIMARY KEY (code);


--
-- Name: resources resources_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.resources
    ADD CONSTRAINT resources_pkey PRIMARY KEY (id);


--
-- Name: schedules schedules_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.schedules
    ADD CONSTRAINT schedules_pkey PRIMARY KEY (schedule_id);


--
-- Name: student_statistics student_statistics_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.student_statistics
    ADD CONSTRAINT student_statistics_pkey PRIMARY KEY (id);


--
-- Name: teacher_class teacher_class_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teacher_class
    ADD CONSTRAINT teacher_class_pkey PRIMARY KEY (teacher_id, class_id);


--
-- Name: teacher_tools teacher_tools_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teacher_tools
    ADD CONSTRAINT teacher_tools_pkey PRIMARY KEY (id);


--
-- Name: teachers teachers_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teachers
    ADD CONSTRAINT teachers_pkey PRIMARY KEY (teacher_id);


--
-- Name: teaching_categories teaching_categories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_categories
    ADD CONSTRAINT teaching_categories_pkey PRIMARY KEY (id);


--
-- Name: teaching_resource_types teaching_resource_types_code_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_resource_types
    ADD CONSTRAINT teaching_resource_types_code_key UNIQUE (code);


--
-- Name: teaching_resource_types teaching_resource_types_name_key; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_resource_types
    ADD CONSTRAINT teaching_resource_types_name_key UNIQUE (name);


--
-- Name: teaching_resource_types teaching_resource_types_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_resource_types
    ADD CONSTRAINT teaching_resource_types_pkey PRIMARY KEY (id);


--
-- Name: teaching_resources teaching_resources_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_resources
    ADD CONSTRAINT teaching_resources_pkey PRIMARY KEY (id);


--
-- Name: teaching_subcategories teaching_subcategories_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_subcategories
    ADD CONSTRAINT teaching_subcategories_pkey PRIMARY KEY (id);


--
-- Name: terms terms_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.terms
    ADD CONSTRAINT terms_pkey PRIMARY KEY (term_id);


--
-- Name: theme_contents theme_contents_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.theme_contents
    ADD CONSTRAINT theme_contents_pkey PRIMARY KEY (id);


--
-- Name: time_slots time_slots_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.time_slots
    ADD CONSTRAINT time_slots_pkey PRIMARY KEY (slot_id);


--
-- Name: activity_categories uk_f38eb6q6qnyjw3ye7j9iym92i; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_categories
    ADD CONSTRAINT uk_f38eb6q6qnyjw3ye7j9iym92i UNIQUE (value);


--
-- Name: notice_recipients uk_notice_recipient; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notice_recipients
    ADD CONSTRAINT uk_notice_recipient UNIQUE (notice_id, recipient_type, target_id);


--
-- Name: schedules uk_schedule_unique; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.schedules
    ADD CONSTRAINT uk_schedule_unique UNIQUE (specific_date, slot_id, class_id);


--
-- Name: student_statistics uk_student_term; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.student_statistics
    ADD CONSTRAINT uk_student_term UNIQUE (student_id, term_id);


--
-- Name: classes unique_class_per_grade; Type: CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.classes
    ADD CONSTRAINT unique_class_per_grade UNIQUE (class_name, grade_id);


--
-- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: zf
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_pkey PRIMARY KEY (id);


--
-- Name: users users_username_key; Type: CONSTRAINT; Schema: public; Owner: zf
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_username_key UNIQUE (username);


--
-- Name: idx_activities_creator_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_activities_creator_id ON public.activities USING btree (creator_id);


--
-- Name: idx_activities_date; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_activities_date ON public.activities USING btree (start_date, end_date);


--
-- Name: idx_activities_participants; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_activities_participants ON public.activities USING btree (current_participants, max_participants);


--
-- Name: idx_base_name; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_base_name ON public.activity_bases USING btree (name);


--
-- Name: idx_category_type; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_category_type ON public.course_categories USING btree (category_type);


--
-- Name: idx_category_value; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_category_value ON public.activity_categories USING btree (value);


--
-- Name: idx_checkin_activity_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_checkin_activity_user ON public.activity_checkins USING btree (activity_id, user_id);


--
-- Name: idx_checkin_date; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_checkin_date ON public.activity_checkins USING btree (check_date);


--
-- Name: idx_checkin_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_checkin_id ON public.activity_checkin_images USING btree (checkin_id);


--
-- Name: idx_checkins_user_date; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_checkins_user_date ON public.activity_checkins USING btree (user_id, check_date);


--
-- Name: idx_contents_created_by; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_contents_created_by ON public.theme_contents USING btree (created_by);


--
-- Name: idx_contents_sort_order; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_contents_sort_order ON public.theme_contents USING btree (sort_order);


--
-- Name: idx_contents_theme_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_contents_theme_id ON public.theme_contents USING btree (theme_id);


--
-- Name: idx_conversations_type; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_conversations_type ON public.chat_conversations USING btree (type);


--
-- Name: idx_conversations_updated; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_conversations_updated ON public.chat_conversations USING btree (updated_at);


--
-- Name: idx_creator_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_creator_id ON public.activities USING btree (creator_id);


--
-- Name: idx_display_order; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_display_order ON public.course_categories USING btree (display_order);


--
-- Name: idx_extracurricular_category; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_extracurricular_category ON public.extracurricular_recordings USING btree (category);


--
-- Name: idx_extracurricular_class; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_extracurricular_class ON public.extracurricular_recordings USING btree (class_id);


--
-- Name: idx_extracurricular_tags; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_extracurricular_tags ON public.extracurricular_tags USING btree (recording_id);


--
-- Name: idx_extracurricular_teacher; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_extracurricular_teacher ON public.extracurricular_recordings USING btree (teacher_id);


--
-- Name: idx_extracurricular_term; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_extracurricular_term ON public.extracurricular_recordings USING btree (term_id);


--
-- Name: idx_images_checkin; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_images_checkin ON public.activity_checkin_images USING btree (checkin_id);


--
-- Name: idx_messages_conversation; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_messages_conversation ON public.chat_messages USING btree (conversation_id);


--
-- Name: idx_messages_created; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_messages_created ON public.chat_messages USING btree (created_at);


--
-- Name: idx_notices_created_at; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_notices_created_at ON public.notices USING btree (created_at);


--
-- Name: idx_notices_creator; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_notices_creator ON public.notices USING btree (created_by);


--
-- Name: idx_notices_schedule; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_notices_schedule ON public.notices USING btree (schedule_id);


--
-- Name: idx_notices_type; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_notices_type ON public.notices USING btree (type_id);


--
-- Name: idx_participants_conversation; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_participants_conversation ON public.chat_participants USING btree (conversation_id);


--
-- Name: idx_participants_user; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_participants_user ON public.activity_participants USING btree (user_id);


--
-- Name: idx_recipients_notice; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_recipients_notice ON public.notice_recipients USING btree (notice_id);


--
-- Name: idx_recipients_read_status; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_recipients_read_status ON public.notice_recipients USING btree (read_status);


--
-- Name: idx_recipients_target; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_recipients_target ON public.notice_recipients USING btree (recipient_type, target_id);


--
-- Name: idx_recording_class; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_recording_class ON public.course_recordings USING btree (class_name);


--
-- Name: idx_recording_time; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_recording_time ON public.course_recordings USING btree (start_time, end_time);


--
-- Name: idx_resource_subject; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_resource_subject ON public.resources USING btree (subject);


--
-- Name: idx_resource_type; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_resource_type ON public.resources USING btree (type);


--
-- Name: idx_signup_time; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_signup_time ON public.activity_participants USING btree (signup_time);


--
-- Name: idx_start_date; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_start_date ON public.activities USING btree (start_date);


--
-- Name: idx_student_statistics_honor; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_student_statistics_honor ON public.student_statistics USING btree (honor_evaluation);


--
-- Name: idx_student_statistics_student_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_student_statistics_student_id ON public.student_statistics USING btree (student_id);


--
-- Name: idx_student_statistics_term_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_student_statistics_term_id ON public.student_statistics USING btree (term_id);


--
-- Name: idx_teaching_categories_grade; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_teaching_categories_grade ON public.teaching_categories USING btree (grade_id);


--
-- Name: idx_teaching_resources_subcategory; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_teaching_resources_subcategory ON public.teaching_resources USING btree (subcategory_id);


--
-- Name: idx_teaching_resources_subject; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_teaching_resources_subject ON public.teaching_resources USING btree (subject);


--
-- Name: idx_teaching_resources_type; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_teaching_resources_type ON public.teaching_resources USING btree (type_id);


--
-- Name: idx_teaching_subcategories_category; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_teaching_subcategories_category ON public.teaching_subcategories USING btree (category_id);


--
-- Name: idx_themes_created_by; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_themes_created_by ON public.education_themes USING btree (created_by);


--
-- Name: idx_themes_is_main; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_themes_is_main ON public.education_themes USING btree (is_main);


--
-- Name: idx_themes_parent_id; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_themes_parent_id ON public.education_themes USING btree (parent_id);


--
-- Name: idx_themes_sort_order; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_themes_sort_order ON public.education_themes USING btree (sort_order);


--
-- Name: idx_user_activity; Type: INDEX; Schema: public; Owner: postgres
--

CREATE INDEX idx_user_activity ON public.activity_participants USING btree (user_id, activity_id);


--
-- Name: chat_messages trigger_update_conversation_timestamp; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_update_conversation_timestamp AFTER INSERT ON public.chat_messages FOR EACH ROW EXECUTE FUNCTION public.update_conversation_timestamp();


--
-- Name: theme_contents trigger_update_updated_at_contents; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_update_updated_at_contents BEFORE UPDATE ON public.theme_contents FOR EACH ROW EXECUTE FUNCTION public.update_updated_at();


--
-- Name: education_themes trigger_update_updated_at_themes; Type: TRIGGER; Schema: public; Owner: postgres
--

CREATE TRIGGER trigger_update_updated_at_themes BEFORE UPDATE ON public.education_themes FOR EACH ROW EXECUTE FUNCTION public.update_updated_at();


--
-- Name: activities activities_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activities
    ADD CONSTRAINT activities_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: activity_checkin_images activity_checkin_images_checkin_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_checkin_images
    ADD CONSTRAINT activity_checkin_images_checkin_id_fkey FOREIGN KEY (checkin_id) REFERENCES public.activity_checkins(id) ON DELETE CASCADE;


--
-- Name: activity_checkins activity_checkins_activity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_checkins
    ADD CONSTRAINT activity_checkins_activity_id_fkey FOREIGN KEY (activity_id) REFERENCES public.activities(id) ON DELETE CASCADE;


--
-- Name: activity_checkins activity_checkins_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_checkins
    ADD CONSTRAINT activity_checkins_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: activity_participants activity_participants_activity_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_participants
    ADD CONSTRAINT activity_participants_activity_id_fkey FOREIGN KEY (activity_id) REFERENCES public.activities(id) ON DELETE CASCADE;


--
-- Name: activity_participants activity_participants_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activity_participants
    ADD CONSTRAINT activity_participants_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: chat_conversations chat_conversations_created_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_conversations
    ADD CONSTRAINT chat_conversations_created_by_fkey FOREIGN KEY (created_by) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: chat_messages chat_messages_conversation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_messages
    ADD CONSTRAINT chat_messages_conversation_id_fkey FOREIGN KEY (conversation_id) REFERENCES public.chat_conversations(id) ON DELETE CASCADE;


--
-- Name: chat_messages chat_messages_sender_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_messages
    ADD CONSTRAINT chat_messages_sender_id_fkey FOREIGN KEY (sender_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: chat_participants chat_participants_conversation_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_participants
    ADD CONSTRAINT chat_participants_conversation_id_fkey FOREIGN KEY (conversation_id) REFERENCES public.chat_conversations(id) ON DELETE CASCADE;


--
-- Name: chat_participants chat_participants_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.chat_participants
    ADD CONSTRAINT chat_participants_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: classes classes_grade_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.classes
    ADD CONSTRAINT classes_grade_id_fkey FOREIGN KEY (grade_id) REFERENCES public.grades(grade_id);


--
-- Name: course_items course_items_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.course_items
    ADD CONSTRAINT course_items_category_id_fkey FOREIGN KEY (category_id) REFERENCES public.course_categories(id);


--
-- Name: education_themes education_themes_parent_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.education_themes
    ADD CONSTRAINT education_themes_parent_id_fkey FOREIGN KEY (parent_id) REFERENCES public.education_themes(id) ON DELETE SET NULL;


--
-- Name: extracurricular_tags extracurricular_tags_recording_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.extracurricular_tags
    ADD CONSTRAINT extracurricular_tags_recording_id_fkey FOREIGN KEY (recording_id) REFERENCES public.extracurricular_recordings(id) ON DELETE CASCADE;


--
-- Name: education_sub_theme fk7ouo7o1tvem8hvbkarnm0c9vo; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.education_sub_theme
    ADD CONSTRAINT fk7ouo7o1tvem8hvbkarnm0c9vo FOREIGN KEY (theme_id) REFERENCES public.education_themes(id);


--
-- Name: activities fk_activities_base_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activities
    ADD CONSTRAINT fk_activities_base_id FOREIGN KEY (base_id) REFERENCES public.activity_bases(id);


--
-- Name: activities fk_activities_creator_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.activities
    ADD CONSTRAINT fk_activities_creator_id FOREIGN KEY (creator_id) REFERENCES public.users(id);


--
-- Name: notices fk_notice_creator; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notices
    ADD CONSTRAINT fk_notice_creator FOREIGN KEY (created_by) REFERENCES public.users(id);


--
-- Name: notices fk_notice_schedule; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notices
    ADD CONSTRAINT fk_notice_schedule FOREIGN KEY (schedule_id) REFERENCES public.schedules(schedule_id);


--
-- Name: notices fk_notice_type; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notices
    ADD CONSTRAINT fk_notice_type FOREIGN KEY (type_id) REFERENCES public.notice_types(type_id);


--
-- Name: notice_recipients fk_recipient_notice; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.notice_recipients
    ADD CONSTRAINT fk_recipient_notice FOREIGN KEY (notice_id) REFERENCES public.notices(notice_id) ON DELETE CASCADE;


--
-- Name: student_statistics fk_student_statistics_student; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.student_statistics
    ADD CONSTRAINT fk_student_statistics_student FOREIGN KEY (student_id) REFERENCES public.users(id) ON DELETE CASCADE;


--
-- Name: student_statistics fk_student_statistics_term; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.student_statistics
    ADD CONSTRAINT fk_student_statistics_term FOREIGN KEY (term_id) REFERENCES public.terms(term_id) ON DELETE CASCADE;


--
-- Name: check_in_images fkbu613pd69ll3xwv6x4kfweikc; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.check_in_images
    ADD CONSTRAINT fkbu613pd69ll3xwv6x4kfweikc FOREIGN KEY (record_id) REFERENCES public.check_in_records(id);


--
-- Name: teacher_class fkgktlpa19k4blid5ea7ctq3nmr; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teacher_class
    ADD CONSTRAINT fkgktlpa19k4blid5ea7ctq3nmr FOREIGN KEY (teacher_id) REFERENCES public.users(id);


--
-- Name: check_in_records fkjewqge2dqjf4m7dlgeqqv1sid; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.check_in_records
    ADD CONSTRAINT fkjewqge2dqjf4m7dlgeqqv1sid FOREIGN KEY (activity_id) REFERENCES public.check_in_activities(id);


--
-- Name: resources resources_type_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.resources
    ADD CONSTRAINT resources_type_fkey FOREIGN KEY (type) REFERENCES public.resource_types(code);


--
-- Name: schedules schedules_class_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.schedules
    ADD CONSTRAINT schedules_class_id_fkey FOREIGN KEY (class_id) REFERENCES public.classes(class_id);


--
-- Name: schedules schedules_classroom_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.schedules
    ADD CONSTRAINT schedules_classroom_id_fkey FOREIGN KEY (classroom_id) REFERENCES public.classrooms(classroom_id);


--
-- Name: schedules schedules_course_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.schedules
    ADD CONSTRAINT schedules_course_id_fkey FOREIGN KEY (course_id) REFERENCES public.courses(course_id);


--
-- Name: schedules schedules_slot_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.schedules
    ADD CONSTRAINT schedules_slot_id_fkey FOREIGN KEY (slot_id) REFERENCES public.time_slots(slot_id);


--
-- Name: schedules schedules_teacher_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.schedules
    ADD CONSTRAINT schedules_teacher_id_fkey FOREIGN KEY (teacher_id) REFERENCES public.teachers(teacher_id);


--
-- Name: schedules schedules_term_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.schedules
    ADD CONSTRAINT schedules_term_id_fkey FOREIGN KEY (term_id) REFERENCES public.terms(term_id);


--
-- Name: teacher_class teacher_class_class_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teacher_class
    ADD CONSTRAINT teacher_class_class_id_fkey FOREIGN KEY (class_id) REFERENCES public.classes(class_id);


--
-- Name: teacher_class teacher_class_teacher_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teacher_class
    ADD CONSTRAINT teacher_class_teacher_id_fkey FOREIGN KEY (teacher_id) REFERENCES public.teachers(teacher_id);


--
-- Name: teaching_categories teaching_categories_grade_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_categories
    ADD CONSTRAINT teaching_categories_grade_id_fkey FOREIGN KEY (grade_id) REFERENCES public.grades(grade_id) ON DELETE CASCADE;


--
-- Name: teaching_resources teaching_resources_subcategory_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_resources
    ADD CONSTRAINT teaching_resources_subcategory_id_fkey FOREIGN KEY (subcategory_id) REFERENCES public.teaching_subcategories(id) ON DELETE CASCADE;


--
-- Name: teaching_resources teaching_resources_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_resources
    ADD CONSTRAINT teaching_resources_type_id_fkey FOREIGN KEY (type_id) REFERENCES public.teaching_resource_types(id);


--
-- Name: teaching_subcategories teaching_subcategories_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.teaching_subcategories
    ADD CONSTRAINT teaching_subcategories_category_id_fkey FOREIGN KEY (category_id) REFERENCES public.teaching_categories(id) ON DELETE CASCADE;


--
-- Name: theme_contents theme_contents_theme_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--

ALTER TABLE ONLY public.theme_contents
    ADD CONSTRAINT theme_contents_theme_id_fkey FOREIGN KEY (theme_id) REFERENCES public.education_themes(id) ON DELETE CASCADE;


--
-- Name: users users_class_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: zf
--

ALTER TABLE ONLY public.users
    ADD CONSTRAINT users_class_id_fkey FOREIGN KEY (class_id) REFERENCES public.classes(class_id);


--
-- PostgreSQL database dump complete
--

\unrestrict hEsJCx671IvgUTePxcVMBcIncAFUAThQo1FgAmti0KgSEidJNRbF5IUKPmGV9kV

